category | Zend |
---|---|
package | Zend_Validate |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Validate_Abstract |
__construct(string|array|\Zend_Config $options = array()
)
string
array
\Zend_Config
OPTIONAL Type of CCI to allow
__get(string $property) : mixed
string
\Zend_Validate_Exception |
---|
mixed
addType(string|array $type) : \Zend_Validate_CreditCard
string
array
Type to allow for validation
\Zend_Validate_CreditCard
Provides a fluent interfacegetDefaultTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getErrors() : array
deprecated | Since 1.5.0 |
---|
array
getMessageLength() : integer
integer
getMessageTemplates() : array
array
getMessageVariables() : array
array
getMessages() : array
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
inherited_from | \Zend_Validate_Interface::getMessages() |
---|
array
getObscureValue() : boolean
boolean
getService() : callback
callback
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getType() : array
array
hasDefaultTranslator() : boolean
boolean
hasTranslator() : boolean
boolean
isValid(string $value) : boolean
Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum)
string
boolean
setDefaultTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
)
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
setDisableTranslator(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setMessage(string $messageString, string $messageKey = null
) : \Zend_Validate_Abstract
string
string
OPTIONAL
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
Provides a fluent interfacesetMessageLength(integer $length = -1
)
integer
setMessages(array $messages) : \Zend_Validate_Abstract
array
\Zend_Validate_Abstract
setObscureValue(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setService(mixed $service) : \Zend_Validate_CreditCard
fluent | This method is part of a fluent interface and will return the same instance |
---|
mixed
\Zend_Validate_Exception |
---|
\Zend_Validate_CreditCard
setTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
) : \Zend_Validate_Abstract
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
setType(string|array $type) : \Zend_Validate_CreditCard
string
array
Type to allow for validation
\Zend_Validate_CreditCard
Provides a fluent interfacetranslatorIsDisabled() : boolean
boolean
_createMessage(string $messageKey, string $value) : string
Returns null if and only if $messageKey does not correspond to an existing template.
If a translator is available and a translation exists for $messageKey, the translation will be used.
string
string
string
_error(string $messageKey, string $value = null
) : void
string
string
OPTIONAL
_implodeRecursive(array $pieces) : string
array
string
_setValue(mixed $value) : void
mixed
$_cardLength : array
array(self::AMERICAN_EXPRESS => array(15), self::DINERS_CLUB => array(14), self::DINERS_CLUB_US => array(16), self::DISCOVER => array(16), self::JCB => array(16), self::LASER => array(16, 17, 18, 19), self::MAESTRO => array(12, 13, 14, 15, 16, 17, 18, 19), self::MASTERCARD => array(16), self::SOLO => array(16, 18, 19), self::UNIONPAY => array(16, 17, 18, 19), self::VISA => array(16))
$_cardType : array
array(self::AMERICAN_EXPRESS => array('34', '37'), self::DINERS_CLUB => array('300', '301', '302', '303', '304', '305', '36'), self::DINERS_CLUB_US => array('54', '55'), self::DISCOVER => array('6011', '622126', '622127', '622128', '622129', '62213', '62214', '62215', '62216', '62217', '62218', '62219', '6222', '6223', '6224', '6225', '6226', '6227', '6228', '62290', '62291', '622920', '622921', '622922', '622923', '622924', '622925', '644', '645', '646', '647', '648', '649', '65'), self::JCB => array('3528', '3529', '353', '354', '355', '356', '357', '358'), self::LASER => array('6304', '6706', '6771', '6709'), self::MAESTRO => array('5018', '5020', '5038', '6304', '6759', '6761', '6763'), self::MASTERCARD => array('51', '52', '53', '54', '55'), self::SOLO => array('6334', '6767'), self::UNIONPAY => array('622126', '622127', '622128', '622129', '62213', '62214', '62215', '62216', '62217', '62218', '62219', '6222', '6223', '6224', '6225', '6226', '6227', '6228', '62290', '62291', '622920', '622921', '622922', '622923', '622924', '622925'), self::VISA => array('4'))
$_defaultTranslator : \Zend_Translate
$_errors : array
array()
deprecated | Since 1.5.0 |
---|
$_obscureValue : boolean
false
$_service : callback
$_translator : \Zend_Translate
$_translatorDisabled : Boolean
false
$_type : array
array()
$_value : mixed
ALL = 'All' : string
AMERICAN_EXPRESS = 'American_Express'
CHECKSUM = 'creditcardChecksum'
CONTENT = 'creditcardContent'
DINERS_CLUB = 'Diners_Club'
DINERS_CLUB_US = 'Diners_Club_US'
DISCOVER = 'Discover'
INVALID = 'creditcardInvalid'
JCB = 'JCB'
LASER = 'Laser'
LENGTH = 'creditcardLength'
MAESTRO = 'Maestro'
MASTERCARD = 'Mastercard'
PREFIX = 'creditcardPrefix'
SERVICE = 'creditcardService'
SERVICEFAILURE = 'creditcardServiceFailure'
SOLO = 'Solo'
UNIONPAY = 'Unionpay'
VISA = 'Visa'