public function EntityExportCsvForm::validateForm in Entity Export CSV 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/ EntityExportCsvForm.php, line 291
Class
- EntityExportCsvForm
- Class EntityExportCsvForm.
Namespace
Drupal\entity_export_csv\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->cleanValues()
->getValues();
if (empty($values['entity_type_id'])) {
$form_state
->setError($form['entity_type_id'], $this
->t('The entity type ID is mandatory. Please select one and configure the export csv configuration.'));
}
parent::validateForm($form, $form_state);
}