Definition at line 38 of file PostCode.php.
 
◆ __construct()
      
        
          | __construct  | 
          ( | 
            | 
          $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".
- Parameters
 - 
  
  
 
- Exceptions
 - 
  
  
 
Definition at line 74 of file PostCode.php.
   81             #require_once 'Zend/Registry.php';    87             if (array_key_exists(
'locale', 
$options)) {
    91             if (array_key_exists(
'format', 
$options)) {
   101             #require_once 'Zend/Validate/Exception.php'; 
elseif(isset( $params[ 'redirect_parent']))
 
static isRegistered($index)
 
 
 
 
◆ getFormat()
Returns the set postal code format
- Returns
 - string 
 
Definition at line 155 of file PostCode.php.
 
 
◆ getLocale()
Returns the set locale
- Returns
 - string|Zend_Locale The set locale 
 
Definition at line 111 of file PostCode.php.
 
 
◆ isValid()
◆ setFormat()
Sets a self defined postal format as regex
- Parameters
 - 
  
  
 
- Exceptions
 - 
  
  
 
- Returns
 - Zend_Validate_PostCode Provides a fluent interface 
 
Definition at line 167 of file PostCode.php.
  170             #require_once 'Zend/Validate/Exception.php'; 
 
 
 
◆ setLocale()
      
        
          | setLocale  | 
          ( | 
            | 
          $locale = null | ) | 
           | 
        
      
 
Sets the locale to use
- Parameters
 - 
  
  
 
- Exceptions
 - 
  
  
 
- Returns
 - Zend_Validate_PostCode Provides a fluent interface 
 
Definition at line 124 of file PostCode.php.
  126         #require_once 'Zend/Locale.php';   129         $region        = $locale->getRegion();
   130         if (empty($region)) {
   131             #require_once 'Zend/Validate/Exception.php';   136             $locale->getRegion(),
   142             #require_once 'Zend/Validate/Exception.php';   143             throw new Zend_Validate_Exception(
"Unable to detect a postcode format for the region '{$locale->getRegion()}'");
 static getTranslation($value=null, $path=null, $locale=null)
 
static findLocale($locale=null)
 
 
 
 
◆ $_format
◆ $_locale
◆ $_messageTemplates
Initial value:= array(
        self::INVALID  => "Invalid type given. String or integer expected",
        self::NO_MATCH => "'%value%' does not appear to be a postal code",
    )
 
Definition at line 46 of file PostCode.php.
 
 
◆ INVALID
      
        
          | const INVALID = 'postcodeInvalid' | 
        
      
 
 
◆ NO_MATCH
      
        
          | const NO_MATCH = 'postcodeNoMatch' | 
        
      
 
 
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Validate/PostCode.php