MDL-39422 mod_forms: prevent long coruse module names
To prevent ugly DB errors.
This commit is contained in:
@@ -45,6 +45,7 @@ class mod_assignment_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('description', 'assignment'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user