NEW: Add extension hook for field-specific validation

This commit is contained in:
Loz Calver 2023-02-22 16:07:57 +00:00
parent 903c482036
commit 05f775a78d

View File

@ -17,7 +17,7 @@ class WildcardDomainField extends TextField
public function validate($validator)
{
if ($this->checkHostname($this->Value())) {
return true;
return $this->extendValidationResult(true, $validator);
}
$validator->validationError(
@ -25,7 +25,7 @@ class WildcardDomainField extends TextField
_t('DomainNameField.INVALID_DOMAIN', 'Invalid domain name'),
'validation'
);
return false;
return $this->extendValidationResult(false, $validator);
}
/**