function ActionForm::validateForm

Overrides ExpressionFormInterface::validateForm

File

src/Form/Expression/ActionForm.php, line 132

Class

ActionForm
UI form for adding/editing a Rules action.

Namespace

Drupal\rules\Form\Expression

Code

public function validateForm(array $form, FormStateInterface $form_state) {
    // Only if there is an action selected already we can validate something.
    if ($form_state->get('action_id')) {
        // Invoke the submission handler which will setup the expression being
        // edited in the form. That way the expression is ready for other
        // validation handlers.
        $this->submitForm($form, $form_state);
    }
}