You are here

function _postal_code_validator in Postal Code 7

Actual validation function.

1 call to _postal_code_validator()
_postal_code_postal_validate in ./postal_code.module
Validation of Postal Code element.

File

./postal_code.module, line 238

Code

function _postal_code_validator($countrycode, $formvalue) {
  $postal_code_validation_data = postal_code_validation();
  $regex = $postal_code_validation_data[$countrycode][0];
  $error_array[] = preg_match($regex, $formvalue);
  return $error_array;
}