diff --git a/main/gradebook/lib/fe/evalform.class.php b/main/gradebook/lib/fe/evalform.class.php index ae021e46a2..072df4b3fe 100755 --- a/main/gradebook/lib/fe/evalform.class.php +++ b/main/gradebook/lib/fe/evalform.class.php @@ -555,7 +555,16 @@ class EvalForm extends FormValidator $this->addRule('hid_category_id', get_lang('ThisFieldIsRequired'), 'required'); $this->addElement('checkbox', 'visible', null, get_lang('Visible')); $this->addRule('max', get_lang('OnlyNumbers'), 'numeric'); - $this->addRule('max', get_lang('NegativeValue'), 'compare', '>='); + $this->addRule( + 'max', + get_lang('NegativeValue'), + 'compare', + '>=', + 'server', + false, + false, + 0 + ); $setting = api_get_setting('tool_visible_by_default_at_creation'); $visibility_default = 1; if (isset($setting['gradebook']) && $setting['gradebook'] == 'false') { diff --git a/main/gradebook/lib/fe/linkaddeditform.class.php b/main/gradebook/lib/fe/linkaddeditform.class.php index a256ca9e88..3503444bfd 100755 --- a/main/gradebook/lib/fe/linkaddeditform.class.php +++ b/main/gradebook/lib/fe/linkaddeditform.class.php @@ -152,7 +152,16 @@ class LinkAddEditForm extends FormValidator } else { $this->addText('max', get_lang('QualificationNumeric'), true, array('size' => '4', 'maxlength' => '5')); $this->addRule('max', get_lang('OnlyNumbers'), 'numeric'); - $this->addRule('max', get_lang('NegativeValue'), 'compare', '>='); + $this->addRule( + 'max', + get_lang('NegativeValue'), + 'compare', + '>=', + 'server', + false, + false, + 0 + ); } if ($form_type == self::TYPE_EDIT) { $defaults['max'] = $link->get_max();