function RulesAbstractPluginUI::form_validate

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

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