mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-36056 forms: Don't validate disabled fields
When fields are disabled, the value comes through as null so we need to specifically check for it before validation.
This commit is contained in:
parent
9e51dc406f
commit
387f7aae0d
@ -101,8 +101,7 @@ class MoodleQuickForm_passwordunmask extends MoodleQuickForm_password {
|
||||
* @return string|null Validation error message or null.
|
||||
*/
|
||||
public function validateSubmitValue($value) {
|
||||
|
||||
if ($value !== trim($value)) {
|
||||
if ($value !== null && $value !== trim($value)) {
|
||||
return get_string('err_wrappingwhitespace', 'core_form');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user