mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10937 from creative-commoners/pulls/5.0/fix-validation
FIX Call Textarea validation extension
This commit is contained in:
commit
2c9beab760
@ -174,6 +174,7 @@ class TextareaField extends FormField
|
||||
*/
|
||||
public function validate($validator)
|
||||
{
|
||||
$result = true;
|
||||
if (!is_null($this->maxLength) && mb_strlen($this->value ?? '') > $this->maxLength) {
|
||||
$name = strip_tags($this->Title() ? $this->Title() : $this->getName());
|
||||
$validator->validationError(
|
||||
@ -185,9 +186,9 @@ class TextareaField extends FormField
|
||||
),
|
||||
"validation"
|
||||
);
|
||||
return false;
|
||||
$result = false;
|
||||
}
|
||||
return true;
|
||||
return $this->extendValidationResult($result, $validator);
|
||||
}
|
||||
|
||||
public function getSchemaValidation()
|
||||
|
Loading…
Reference in New Issue
Block a user