public function CustomSalesReport::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/ CustomSalesReport.php, line 114
Class
- CustomSalesReport
- Generates customized sales 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.'));
}
}