You are here

public function WebformAjaxFormTrait::validateAjaxForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformAjaxFormTrait.php \Drupal\webform\Form\WebformAjaxFormTrait::validateAjaxForm()

Validate form #ajax callback.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

1 method overrides WebformAjaxFormTrait::validateAjaxForm()
WebformSubmissionForm::validateAjaxForm in src/WebformSubmissionForm.php
Validate form #ajax callback.

File

src/Form/WebformAjaxFormTrait.php, line 245

Class

WebformAjaxFormTrait
Trait for webform ajax support.

Namespace

Drupal\webform\Form

Code

public function validateAjaxForm(array &$form, FormStateInterface $form_state) {
  if (!$this
    ->isCallableAjaxCallback($form, $form_state)) {
    $this
      ->missingAjaxCallback($form, $form_state);
  }
}