Public Member Functions | Data Fields | Protected Attributes | Static Protected Attributes

Zend_Validate_Ccnum Class Reference

Inheritance diagram for Zend_Validate_Ccnum:
Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 isValid ($value)

Data Fields

const LENGTH = 'ccnumLength'
const CHECKSUM = 'ccnumChecksum'

Protected Attributes

 $_messageTemplates

Static Protected Attributes

static $_filter = null

Detailed Description

Definition at line 36 of file Ccnum.php.


Member Function Documentation

isValid ( value )

Defined by Zend_Validate_Interface

Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum)

Parameters:
string$value
Returns:
boolean

See also:
Zend_Filter_Digits

Implements Zend_Validate_Interface.

Definition at line 73 of file Ccnum.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::LENGTH   => "'%value%' must contain between 13 and 19 digits",
        self::CHECKSUM => "Luhn algorithm (mod-10 checksum) failed on '%value%'"
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 60 of file Ccnum.php.

const CHECKSUM = 'ccnumChecksum'

Validation failure message key for when the value fails the mod-10 checksum

Definition at line 46 of file Ccnum.php.

const LENGTH = 'ccnumLength'

Validation failure message key for when the value is not of valid length

Definition at line 41 of file Ccnum.php.


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