public function RulesAbstractPluginUI::form_validate in Rules 7.2
Parameters
array $form: The form array where to add the form.
array $form_state: The current form state.
Overrides RulesPluginUI::form_validate
File
- ui/
ui.core.inc, line 991 - Contains core Rules UI functions.
Class
- RulesAbstractPluginUI
- UI for abstract plugins (conditions & actions).
Code
public function form_validate($form, &$form_state) {
parent::form_validate($form, $form_state);
// Validate the edited element and throw validation errors if it fails.
try {
$this->element
->integrityCheck();
} catch (RulesIntegrityException $e) {
form_set_error(implode('][', $e->keys), $e
->getMessage());
}
}