Validate/Iban.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Validate
- Version
- $Id: Iban.php 24593 2012-01-05 20:35:02Z matthew $
Package: Zend\ValidateValidates IBAN Numbers (International Bank Account Numbers)
- Parent(s)
- \Zend_Validate_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants


NOTSUPPORTED
= 'ibanNotSupported'


FALSEFORMAT
= 'ibanFalseFormat'


CHECKFAILED
= 'ibanCheckFailed'
Properties



array $_ibanregex = array('AD' => '/^AD[0-9]{2}[0-9]{8}[A-Z0-9]{12}$/', 'AT' => '/^AT[0-9]{2}[0-9]{5}[0-9]{11}$/', 'BA' => '/^BA[0-9]{2}[0-9]{6}[0-9]{10}$/', 'BE' => '/^BE[0-9]{2}[0-9]{3}[0-9]{9}$/', 'BG' => '/^BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}$/', 'CH' => '/^CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/', 'CS' => '/^CS[0-9]{2}[0-9]{3}[0-9]{15}$/', 'CY' => '/^CY[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/', 'CZ' => '/^CZ[0-9]{2}[0-9]{4}[0-9]{16}$/', 'DE' => '/^DE[0-9]{2}[0-9]{8}[0-9]{10}$/', 'DK' => '/^DK[0-9]{2}[0-9]{4}[0-9]{10}$/', 'EE' => '/^EE[0-9]{2}[0-9]{4}[0-9]{12}$/', 'ES' => '/^ES[0-9]{2}[0-9]{8}[0-9]{12}$/', 'FR' => '/^FR[0-9]{2}[0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5}[0-9]{15}$/', 'TR' => '/^TR[0-9]{2}[0-9]{5}[A-Z0-9]{17}$/')
Default valuearray('AD' => '/^AD[0-9]{2}[0-9]{8}[A-Z0-9]{12}$/', 'AT' => '/^AT[0-9]{2}[0-9]{5}[0-9]{11}$/', 'BA' => '/^BA[0-9]{2}[0-9]{6}[0-9]{10}$/', 'BE' => '/^BE[0-9]{2}[0-9]{3}[0-9]{9}$/', 'BG' => '/^BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}$/', 'CH' => '/^CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/', 'CS' => '/^CS[0-9]{2}[0-9]{3}[0-9]{15}$/', 'CY' => '/^CY[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/', 'CZ' => '/^CZ[0-9]{2}[0-9]{4}[0-9]{16}$/', 'DE' => '/^DE[0-9]{2}[0-9]{8}[0-9]{10}$/', 'DK' => '/^DK[0-9]{2}[0-9]{4}[0-9]{10}$/', 'EE' => '/^EE[0-9]{2}[0-9]{4}[0-9]{12}$/', 'ES' => '/^ES[0-9]{2}[0-9]{8}[0-9]{12}$/', 'FR' => '/^FR[0-9]{2}[0-9]{10}[A-Z0-9]{13}$/', 'FI' => '/^FI[0-9]{2}[0-9]{6}[0-9]{8}$/', 'GB' => '/^GB[0-9]{2}[A-Z]{4}[0-9]{14}$/', 'GI' => '/^GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}$/', 'GR' => '/^GR[0-9]{2}[0-9]{7}[A-Z0-9]{16}$/', 'HR' => '/^HR[0-9]{2}[0-9]{7}[0-9]{10}$/', 'HU' => '/^HU[0-9]{2}[0-9]{7}[0-9]{1}[0-9]{15}[0-9]{1}$/', 'IE' => '/^IE[0-9]{2}[A-Z0-9]{4}[0-9]{6}[0-9]{8}$/', 'IS' => '/^IS[0-9]{2}[0-9]{4}[0-9]{18}$/', 'IT' => '/^IT[0-9]{2}[A-Z]{1}[0-9]{10}[A-Z0-9]{12}$/', 'LI' => '/^LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/', 'LU' => '/^LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}$/', 'LT' => '/^LT[0-9]{2}[0-9]{5}[0-9]{11}$/', 'LV' => '/^LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}$/', 'MK' => '/^MK[0-9]{2}[A-Z]{3}[A-Z0-9]{10}[0-9]{2}$/', 'MT' => '/^MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}$/', 'NL' => '/^NL[0-9]{2}[A-Z]{4}[0-9]{10}$/', 'NO' => '/^NO[0-9]{2}[0-9]{4}[0-9]{7}$/', 'PL' => '/^PL[0-9]{2}[0-9]{8}[0-9]{16}$/', 'PT' => '/^PT[0-9]{2}[0-9]{8}[0-9]{13}$/', 'RO' => '/^RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}$/', 'SE' => '/^SE[0-9]{2}[0-9]{3}[0-9]{17}$/', 'SI' => '/^SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}$/', 'SK' => '/^SK[0-9]{2}[0-9]{4}[0-9]{16}$/', 'TN' => '/^TN[0-9]{2}[0-9]{5}[0-9]{15}$/', 'TR' => '/^TR[0-9]{2}[0-9]{5}[A-Z0-9]{17}$/')
Details- Type
- array



array $_messageTemplates = array(self::NOTSUPPORTED => "Unknown country within the IBAN '%value%'", self::FALSEFORMAT => "'%value%' has a false IBAN format", self::CHECKFAILED => "'%value%' has failed the IBAN check")
Validation failure message template definitions
Default valuearray(self::NOTSUPPORTED => "Unknown country within the IBAN '%value%'", self::FALSEFORMAT => "'%value%' has a false IBAN format", self::CHECKFAILED => "'%value%' has failed the IBAN check")
Details- Type
- array
Methods



__get(string $property) : mixed
inheritedMagic function returns the value of the requested property, if and only if it is the value or a
message variable.
Inherited from:
\Zend_Validate_Abstract::__get() ParametersName | Type | Description |
---|
$property | string | |
---|
ReturnsThrows 


_createMessage(string $messageKey, string $value) : string
Returns null if and only if $messageKey does not correspond to an existing template.
If a translator is available and a translation exists for $messageKey,
the translation will be used.
ParametersName | Type | Description |
---|
$messageKey | string | |
---|
$value | string | |
---|
Returns


_error(string $messageKey, string $value = null) : void
ParametersName | Type | Description |
---|
$messageKey | string | |
---|
$value | string | OPTIONAL |
---|



getMessages() : array
The array keys are validation failure message identifiers,
and the array values are the corresponding human-readable message strings.
If isValid() was never called or if the most recent isValid() call
returned true, then this method returns an empty array.
Returns


isValid(string $value) : boolean
Defined by Zend_Validate_Interface
Returns true if $value is a valid IBAN
ParametersName | Type | Description |
---|
$value | string | |
---|
ReturnsThrows


setMessage(string $messageString, string $messageKey = null) : \Zend_Validate_Abstract
ParametersName | Type | Description |
---|
$messageString | string | |
---|
$messageKey | string | OPTIONAL |
---|
ReturnsThrows 


setMessages(array $messages) : \Zend_Validate_Abstract
inheritedSets validation failure message templates given as an array, where the array keys are the message keys,
and the array values are the message template strings.
Inherited from:
\Zend_Validate_Abstract::setMessages() ParametersName | Type | Description |
---|
$messages | array | |
---|
Returns