public function WebformResultsCustomForm::validateForm in Webform 8.5
Same name and namespace in other branches
- 6.x src/Form/WebformResultsCustomForm.php \Drupal\webform\Form\WebformResultsCustomForm::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/ WebformResultsCustomForm.php, line 412
Class
- WebformResultsCustomForm
- Webform for webform results custom(ize) webform.
Namespace
Drupal\webform\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
$columns = $form_state
->getValue('columns');
if (empty($columns)) {
$form_state
->setErrorByName('columns', $this
->t('At least once column is required'));
}
}