diff options
Diffstat (limited to 'usr/local/www/load_balancer_monitor_edit.php')
-rw-r--r-- | usr/local/www/load_balancer_monitor_edit.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php index 1f30a4f..280244b 100644 --- a/usr/local/www/load_balancer_monitor_edit.php +++ b/usr/local/www/load_balancer_monitor_edit.php @@ -97,8 +97,11 @@ if ($_POST) { if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique."); - if (strpos($_POST['name'], " ") !== false) - $input_errors[] = gettext("You cannot use spaces in the 'name' field."); + if (preg_match('/[ \/]/', $_POST['name'])) + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); + + if (strlen($_POST['name']) > 16) + $input_errors[] = gettext("The 'name' field must be 16 characters or less."); switch($_POST['type']) { case 'icmp': { |