You are here

public function TaxRateListBuilder::validateAddMethod in Ubercart 8.4

Form validation handler for adding a new rate.

File

uc_tax/src/TaxRateListBuilder.php, line 173

Class

TaxRateListBuilder
Provides a listing of tax rate entities.

Namespace

Drupal\uc_tax

Code

public function validateAddMethod(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->isValueEmpty('plugin')) {
    $form_state
      ->setErrorByName('plugin', $this
      ->t('You must select a tax rate type.'));
  }
}