public function CustomProductReport::validateForm in Ubercart 8.4
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
- uc_report/
src/ Form/ CustomProductReport.php, line 91
Class
- CustomProductReport
- Generates customized product reports.
Namespace
Drupal\uc_report\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if ($form_state
->isValueEmpty('status')) {
$form_state
->setErrorByName('status', $this
->t('You must select at least one order status.'));
}
}