mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
Merge pull request #25 from silverstripe-rebelalliance/westpac
Fix for compatibility with userforms 3.0
This commit is contained in:
commit
09ec50bf2d
@ -104,6 +104,13 @@ if(class_exists('EditableFormField')) {
|
|||||||
return $fields;
|
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() {
|
public function getFieldValidationOptions() {
|
||||||
return new FieldList();
|
return new FieldList();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user