You are here

public function OpenIDConnectClientFormBase::validateForm in OpenID Connect / OAuth client 2.x

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

src/Form/OpenIDConnectClientFormBase.php, line 142

Class

OpenIDConnectClientFormBase
Form handler for the OpenID Connect client add and edit forms.

Namespace

Drupal\openid_connect\Form

Code

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

  // Get validation status from the plugins.
  try {

    /** @var \Drupal\openid_connect\OpenIDConnectClientEntityInterface $entity */
    $entity = $this->entity;
    $subform_state = SubformState::createForSubform($form['settings'], $form, $form_state);
    $this
      ->getPluginForm($entity
      ->getPlugin())
      ->validateConfigurationForm($form['settings'], $subform_state);
  } catch (InvalidPluginDefinitionException $e) {
  }
}