mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
Fix for compatibility with userforms 3.0
This commit is contained in:
parent
9cbb11a884
commit
da87f71a15
@ -104,6 +104,13 @@ if(class_exists('EditableFormField')) {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function validateField($data, $form) {
|
||||
$formField = $this->getFormField();
|
||||
if (!$formField->validate($form->getValidator())) {
|
||||
$form->addErrorMessage($this->Name, $this->getErrorMessage()->HTML(), 'error', false);
|
||||
}
|
||||
}
|
||||
|
||||
public function getFieldValidationOptions() {
|
||||
return new FieldList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user