function ConditionForm::validateForm

Overrides ExpressionFormInterface::validateForm

File

src/Form/Expression/ConditionForm.php, line 155

Class

ConditionForm
UI form for adding/editing a Rules condition.

Namespace

Drupal\rules\Form\Expression

Code

public function validateForm(array $form, FormStateInterface $form_state) {
    // Only if there is a condition selected already we can validate something.
    if ($form_state->get('condition_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);
    }
}