Fix for compatibility with userforms 3.0

This commit is contained in:
Christopher Joe 2015-09-21 14:14:49 +12:00
parent 9cbb11a884
commit da87f71a15

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