Moodle  2.2.1
http://www.collinsharper.com
Zend_Validate_Ccnum Class Reference
Inheritance diagram for Zend_Validate_Ccnum:
Collaboration diagram for Zend_Validate_Ccnum:

Public Member Functions

 __construct ()
 isValid ($value)

Data Fields

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

Protected Attributes

 $_messageTemplates

Static Protected Attributes

static $_filter = null

Detailed Description

Definition at line 33 of file Ccnum.php.


Constructor & Destructor Documentation

Definition at line 62 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 75 of file Ccnum.php.

Here is the call graph for this function:


Field Documentation

$_filter = null [static, protected]

Definition at line 50 of file Ccnum.php.

$_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 57 of file Ccnum.php.

const CHECKSUM = 'ccnumChecksum'

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

Definition at line 43 of file Ccnum.php.

const LENGTH = 'ccnumLength'

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

Definition at line 38 of file Ccnum.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations