Explorar o código

Add rule see BT#8177

jmontoyaa %!s(int64=8) %!d(string=hai) anos
pai
achega
81d50d2728
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      main/exercice/exercise.class.php

+ 3 - 0
main/exercice/exercise.class.php

@@ -2228,7 +2228,10 @@ class Exercise
                 array(get_lang('PassPercentage'), null, '%'),
                 array('id' => 'pass_percentage')
             );
+
             $form->addRule('pass_percentage', get_lang('Numeric'), 'numeric');
+            $form->addRule('pass_percentage', get_lang('ValueTooSmall'), 'min_numeric_length', 0);
+            $form->addRule('pass_percentage', get_lang('ValueTooBig'), 'max_numeric_length', 100);
 
             // add the text_when_finished textbox
             $form->addHtmlEditor(