From 886b27a76e018774cc7146d88c93e0f862d653f2 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 7 Nov 2024 16:33:41 +1300 Subject: [PATCH] API Use updated validation API --- src/EditableSpamProtectionField.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EditableSpamProtectionField.php b/src/EditableSpamProtectionField.php index eb91273..8f13aec 100644 --- a/src/EditableSpamProtectionField.php +++ b/src/EditableSpamProtectionField.php @@ -227,9 +227,9 @@ public function validateField($data, $form) $formField->setValue($data[$this->Name]); } - $validator = $form->getValidator(); - if (!$formField->validate($validator)) { - $errors = $validator->getErrors(); + $result = $formField->validate(); + if (!$result->isValid()) { + $errors = $result->getMessages(); $foundError = false; // field validate implementation may not add error to validator