MDL-39422 mod_forms: prevent long coruse module names
To prevent ugly DB errors.
This commit is contained in:
@@ -22,6 +22,7 @@ class mod_data_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
|
||||
$this->add_intro_editor(true, get_string('intro', 'data'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user