Skip to content

Commit

Permalink
FIX Call Textarea validation extension
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 5, 2023
1 parent a0493cf commit 17c3323
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Forms/TextareaField.php
Expand Up @@ -174,6 +174,7 @@ public function Type()
*/
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(
Expand All @@ -185,9 +186,9 @@ public function validate($validator)
),
"validation"
);
return false;
$result = false;
}
return true;
return $this->extendValidationResult($result, $validator);
}

public function getSchemaValidation()
Expand Down

0 comments on commit 17c3323

Please sign in to comment.