Public Member Functions | Data Fields | Protected Attributes

Zend_Validate_Barcode_UpcA Class Reference

Inheritance diagram for Zend_Validate_Barcode_UpcA:
Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 isValid ($value)

Data Fields

const INVALID = 'invalid'
const INVALID_LENGTH = 'invalidLength'

Protected Attributes

 $_messageTemplates

Detailed Description

Definition at line 36 of file UpcA.php.


Member Function Documentation

isValid ( value )

Defined by Zend_Validate_Interface

Returns true if and only if $value contains a valid barcode

Parameters:
string$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 68 of file UpcA.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID        => "'%value%' is an invalid UPC-A barcode",
        self::INVALID_LENGTH => "'%value%' should be 12 characters",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 55 of file UpcA.php.

const INVALID = 'invalid'

Validation failure message key for when the value is an invalid barcode

Definition at line 42 of file UpcA.php.

const INVALID_LENGTH = 'invalidLength'

Validation failure message key for when the value is not 12 characters long

Definition at line 48 of file UpcA.php.


The documentation for this class was generated from the following file: