You are here

public function PostalCodeValidationInterface::validate in Postal Code 8

Custom function defining regexes corresponding to different countries.

Parameters

string $country_code: Short country code.

string $value: Value to be validated.

Return value

array Array of errors.

1 method overrides PostalCodeValidationInterface::validate()
PostalCodeValidation::validate in src/PostalCodeValidation.php
Custom function defining regexes corresponding to different countries.

File

src/PostalCodeValidationInterface.php, line 30

Class

PostalCodeValidationInterface
Interface ValidatorServiceInterface. Provide interface with additional methods for validations of postal code field.

Namespace

Drupal\postal_code

Code

public function validate($country_code, $value);