Permalink
Browse files

MDL-30526 Choice: add form validation rule for numeric field

  • Loading branch information...
1 parent a5b5881 commit 65c7713115538695a0337e1a89a1bbd5406b19ad Ruslan Kabalin committed Nov 30, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/choice/mod_form.php
View
@@ -49,10 +49,11 @@ function definition() {
$repeateloptions = array();
$repeateloptions['limit']['default'] = 0;
$repeateloptions['limit']['disabledif'] = array('limitanswers', 'eq', 0);
+ $repeateloptions['limit']['rule'] = 'numeric';
$mform->setType('limit', PARAM_INT);
$repeateloptions['option']['helpbutton'] = array('choiceoptions', 'choice');
- $mform->setType('option', PARAM_CLEAN);
+ $mform->setType('option', PARAM_CLEANHTML);
$mform->setType('optionid', PARAM_INT);

0 comments on commit 65c7713

Please sign in to comment.