Ver Fonte

Add rule see BT#8177

jmontoyaa há 8 anos atrás
pai
commit
81d50d2728
1 ficheiros alterados com 3 adições e 0 exclusões
  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(