You are here

public function ParametersForm::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_tax_report/src/Form/ParametersForm.php, line 80

Class

ParametersForm
Form to customize parameters on the tax report.

Namespace

Drupal\uc_tax_report\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->isValueEmpty('statuses')) {
    $form_state
      ->setErrorByName('statuses', $this
      ->t('You must select at least one order status.'));
  }
}