You are here

public function TaxNumberItemInterface::checkValue in Commerce Core 8.2

Checks whether the current value can be used for tax calculation.

Confirms that:

  • The type is correct.
  • The number is not empty.
  • The number has been verified, or that unverified numbers are allowed when hen the verification web service is unavailable. This check is skipped if the type does not support verification.

Parameters

string $expected_type: The expected tax number type.

Return value

bool TRUE if the current value can be used, FALSE otherwise.

1 method overrides TaxNumberItemInterface::checkValue()
TaxNumberItem::checkValue in modules/tax/src/Plugin/Field/FieldType/TaxNumberItem.php
Checks whether the current value can be used for tax calculation.

File

modules/tax/src/Plugin/Field/FieldType/TaxNumberItemInterface.php, line 41

Class

TaxNumberItemInterface
Defines the interface for tax number field items.

Namespace

Drupal\commerce_tax\Plugin\Field\FieldType

Code

public function checkValue($expected_type);