You are here

public function ShippingQuoteMethodListBuilder::validateAddMethod in Ubercart 8.4

Form validation handler for adding a new method.

File

shipping/uc_quote/src/ShippingQuoteMethodListBuilder.php, line 144

Class

ShippingQuoteMethodListBuilder
Provides a listing of shipping quote method entities.

Namespace

Drupal\uc_quote

Code

public function validateAddMethod(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->isValueEmpty('plugin')) {
    $form_state
      ->setErrorByName('plugin', $this
      ->t('You must select the new shipping method.'));
  }
}