25 #require_once 'Zend/Validate/Abstract.php'; 47 self::NOTSUPPORTED =>
"Unknown country within the IBAN '%value%'",
48 self::FALSEFORMAT =>
"'%value%' has a false IBAN format",
49 self::CHECKFAILED =>
"'%value%' has failed the IBAN check",
65 'AD' =>
'/^AD[0-9]{2}[0-9]{8}[A-Z0-9]{12}$/',
66 'AE' =>
'/^AE[0-9]{2}[0-9]{3}[0-9]{16}$/',
67 'AL' =>
'/^AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/',
68 'AT' =>
'/^AT[0-9]{2}[0-9]{5}[0-9]{11}$/',
69 'AZ' =>
'/^AZ[0-9]{2}[0-9]{4}[A-Z0-9]{20}$/',
70 'BA' =>
'/^BA[0-9]{2}[0-9]{6}[0-9]{10}$/',
71 'BE' =>
'/^BE[0-9]{2}[0-9]{3}[0-9]{9}$/',
72 'BG' =>
'/^BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}$/',
73 'BH' =>
'/^BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}$/',
74 'BR' =>
'/^BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z]{1}[A-Z0-9]{1}$/',
75 'CH' =>
'/^CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/',
76 'CR' =>
'/^CR[0-9]{2}[0-9]{3}[0-9]{14}$/',
77 'CS' =>
'/^CS[0-9]{2}[0-9]{3}[0-9]{15}$/',
78 'CY' =>
'/^CY[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/',
79 'CZ' =>
'/^CZ[0-9]{2}[0-9]{4}[0-9]{16}$/',
80 'DE' =>
'/^DE[0-9]{2}[0-9]{8}[0-9]{10}$/',
81 'DK' =>
'/^DK[0-9]{2}[0-9]{4}[0-9]{10}$/',
82 'DO' =>
'/^DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}$/',
83 'EE' =>
'/^EE[0-9]{2}[0-9]{4}[0-9]{12}$/',
84 'ES' =>
'/^ES[0-9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5}[A-Z0-9]{12}$/',
127 'TN' =>
'/^TN[0-9]{2}[0-9]{5}[0-9]{15}$/',
128 'TR' =>
'/^TR[0-9]{2}[0-9]{5}[A-Z0-9]{17}$/',
129 'VG' =>
'/^VG[0-9]{2}[A-Z]{4}[0-9]{16}$/' 140 $locale = $locale->toArray();
143 if (is_array($locale)) {
144 if (array_key_exists(
'locale', $locale)) {
145 $locale = $locale[
'locale'];
151 if (empty($locale)) {
152 #require_once 'Zend/Registry.php'; 158 if ($locale !==
null) {
183 if ($locale !==
false) {
184 #require_once 'Zend/Locale.php'; 186 if (strlen($locale) < 4) {
187 #require_once 'Zend/Validate/Exception.php'; 192 $this->_locale = $locale;
209 if (empty($this->_locale)) {
210 $region = substr(
$value, 0, 2);
213 $region = $region->getRegion();
216 if (!array_key_exists($region, $this->_ibanregex)) {
218 $this->
_error(self::NOTSUPPORTED);
222 if (!preg_match($this->_ibanregex[$region],
$value)) {
223 $this->
_error(self::FALSEFORMAT);
229 array(
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
230 'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z'),
231 array(
'10',
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21',
'22',
232 '23',
'24',
'25',
'26',
'27',
'28',
'29',
'30',
'31',
'32',
'33',
'34',
'35'),
235 $temp = intval(substr(
$format, 0, 1));
237 for ($x = 1; $x < $len; ++$x) {
239 $temp += intval(substr(
$format, $x, 1));
244 $this->
_error(self::CHECKFAILED);
__construct($locale=null)
_error($messageKey, $value=null)
static isRegistered($index)
static findLocale($locale=null)