API Documentation

Validate/PostCode.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: PostCode.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_PostCode

Description

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.

Zend_Validate_PostCode

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
INVALID
NO_MATCH
Properties
$_messageTemplates
$_locale
$_format
Methods
__construct
getLocale
setLocale
getFormat
setFormat
isValid

Description

Constants

INVALID

 INVALID = 'postcodeInvalid'

Details

value
postcodeInvalid

NO_MATCH

 NO_MATCH = 'postcodeNoMatch'

Details

value
postcodeNoMatch

Properties

$_format

unknown_type $_format = ''

Manual postal code format

Details

$_format
unknown_type
visibility
protected
default
final
false
static
false

$_locale

string $_locale = ''

Locale to use

Details

$_locale
string
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string|Zend_Locale|array|Zend_Config $options = null ) :

Constructor for the integer validator

Accepts either a string locale, a Zend_Locale object, or an array or Zend_Config object containing the keys "locale" and/or "format".

Arguments
$options
stringZend_LocalearrayZend_Config
Details
visibility
public
final
false
static
false
throws
On empty format

getFormat

getFormat( ) : string

Returns the set postal code format

Output
string
Details
visibility
public
final
false
static
false

getLocale

getLocale( ) : string|Zend_Locale

Returns the set locale

Output
string|Zend_Locale
The set locale
Details
visibility
public
final
false
static
false

isValid

isValid( string $value ) : boolean

Defined by Zend_Validate_Interface

Returns true if and only if $value is a valid postalcode

Arguments
$value
string
Output
boolean
Details
visibility
public
final
false
static
false

setFormat

setFormat( string $format ) : Zend_Validate_PostCode

Sets a self defined postal format as regex

Arguments
$format
string
Output
Zend_Validate_PostCode
Provides fluid interface
Details
visibility
public
final
false
static
false
throws
On empty format

setLocale

setLocale( string|Zend_Locale $locale = null ) : Zend_Validate_PostCode

Sets the locale to use

Arguments
$locale
stringZend_Locale
Output
Zend_Validate_PostCode
Provides fluid interface
Details
visibility
public
final
false
static
false
throws
On unrecognised region
throws
On not detected format
Documentation was generated by DocBlox.