You are here

public function UserIdentityDelete::validateForm in uLogin (advanced version) 8

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/UserIdentityDelete.php, line 126

Class

UserIdentityDelete
User Identity Delete form.

Namespace

Drupal\ulogin\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if (!empty($form['identity_choice']) && $form_state
    ->isValueEmpty('identity_choice')) {
    $form_state
      ->setErrorByName('identity_choice', t('Please choose identity for replacement.'));
  }
}