You are here

public function LearningPathCreateClassForm::validateForm in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 src/Form/LearningPathCreateClassForm.php \Drupal\opigno_learning_path\Form\LearningPathCreateClassForm::validateForm()

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/LearningPathCreateClassForm.php, line 113

Class

LearningPathCreateClassForm
Members create form.

Namespace

Drupal\opigno_learning_path\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if (empty($form_state
    ->getValue('new_class_users'))) {
    $form_state->hasValidateError = TRUE;
  }
}