You are here

public function CheckoutFlowForm::validateForm in Commerce Core 8.2

Form validation handler.

Parameters

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

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

Overrides FormBase::validateForm

File

modules/checkout/src/Form/CheckoutFlowForm.php, line 92

Class

CheckoutFlowForm

Namespace

Drupal\commerce_checkout\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);

  /** @var \Drupal\commerce_checkout\Entity\CheckoutFlowInterface $checkout_flow */
  $checkout_flow = $this->entity;
  if (!$checkout_flow
    ->isNew()) {
    $checkout_flow
      ->getPlugin()
      ->validateConfigurationForm($form['configuration'], $form_state);
  }
}