You are here

protected function countries_import_manager::isValidISO2 in Countries 8

2 calls to countries_import_manager::isValidISO2()
countries_import_cldr::import in modules/countries_import/plugins/countries_import_cldr.inc
countries_import_manager::isUserDefinedISO2 in modules/countries_import/plugins/countries_import_manager.inc

File

modules/countries_import/plugins/countries_import_manager.inc, line 36
Definition of countries_import_manager.

Class

countries_import_manager
Defines a base class for country import managers.

Code

protected function isValidISO2($code) {
  $code = drupal_strtoupper($code);
  return drupal_strlen($code) == 2 && !preg_match('/[^A-Z]/', $code);
}