Validate/Iban.php

Show: PublicProtectedPrivateinherited
Table of Contents
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id$  

\Zend_Validate_Iban

Package: Zend_Validate
Validates IBAN Numbers (International Bank Account Numbers)
Parent(s)
\Zend_Validate_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  NOTSUPPORTED = 'ibanNotSupported'
>VConstant  FALSEFORMAT = 'ibanFalseFormat'
>VConstant  CHECKFAILED = 'ibanCheckFailed'

Properties

>VPropertyprotectedarray $_ibanregex = array('AD' => '/^AD[0-9]{2}[0-9]{8}[A-Z0-9]{12}$/', 'AE' => '/^AE[0-9]{2}[0-9]{3}[0-9]{16}$/', 'AL' => '/^AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/', 'AT' => '/^AT[0-9]{2}[0-9]{5}[0-9]{11}$/', 'AZ' => '/^AZ[0-9]{2}[0-9]{4}[A-Z0-9]{20}$/', '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}$/', 'BH' => '/^BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}$/', 'BR' => '/^BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z]{1}[A-Z0-9]{1}$/', 'CH' => '/^CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/', 'CR' => '/^CR[0-9]{2}[0-9]{3}[0-9]{14}$/', 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I' => '/^SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}$/', 'SK' => '/^SK[0-9]{2}[0-9]{4}[0-9]{16}$/', 'SM' => '/^SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}$/', 'TN' => '/^TN[0-9]{2}[0-9]{5}[0-9]{15}$/', 'TR' => '/^TR[0-9]{2}[0-9]{5}[A-Z0-9]{17}$/', 'VG' => '/^VG[0-9]{2}[A-Z]{4}[0-9]{16}$/')
IBAN regexes by region
Default valuearray('AD' => '/^AD[0-9]{2}[0-9]{8}[A-Z0-9]{12}$/', 'AE' => '/^AE[0-9]{2}[0-9]{3}[0-9]{16}$/', 'AL' => '/^AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}$/', 'AT' => '/^AT[0-9]{2}[0-9]{5}[0-9]{11}$/', 'AZ' => '/^AZ[0-9]{2}[0-9]{4}[A-Z0-9]{20}$/', '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}$/', 'BH' => '/^BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}$/', 'BR' => '/^BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z]{1}[A-Z0-9]{1}$/', 'CH' => '/^CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}$/', 'CR' => '/^CR[0-9]{2}[0-9]{3}[0-9]{14}$/', '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}$/', 'DO' => '/^DO[0-9]{2}[A-Z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', 'VG' => '/^VG[0-9]{2}[A-Z]{4}[0-9]{16}$/')Details
Type
array
>VPropertyprotectedstring|\Zend_Locale|null $_locale
Optional locale
Details
Type
string | \Zend_Locale | null
>VPropertyprotectedarray $_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

methodpublic__construct(string | \Zend_Config | \Zend_Locale $locale = null) : void

Sets validator options

Parameters
NameTypeDescription
$localestring | \Zend_Config | \Zend_Locale

OPTIONAL

methodpublicgetLocale() : string | \Zend_Locale | null

Returns the locale option

Returns
TypeDescription
string | \Zend_Locale | null
methodpublicisValid(string $value) : boolean

Defined by Zend_Validate_Interface

Returns true if $value is a valid IBAN
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
boolean
methodpublicsetLocale(string | \Zend_Locale $locale = null) : \Zend_Validate_Date

Sets the locale option

Parameters
NameTypeDescription
$localestring | \Zend_Locale
Returns
TypeDescription
\Zend_Validate_Dateprovides a fluent interface
Documentation was generated by phpDocumentor 2.2.0 .