Merge pull request #25 from silverstripe-rebelalliance/westpac

Fix for compatibility with userforms 3.0
This commit is contained in:
Damian Mooyman 2015-09-21 17:39:30 +12:00
commit 09ec50bf2d

View File

@ -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();
}