/** * Ensures that the validator follows expected behavior * * @return void */ public function testBasic() { $valuesExpected = array('4929000000006' => true, '5404000000000001' => true, '374200000000004' => true, '4444555566667777' => false, 'ABCDEF' => false); foreach ($valuesExpected as $input => $result) { $this->assertEquals($result, $this->_validator->isValid($input)); } }
/** * Returns TRUE if it is a valid credit card number format. * * @deprecated since 0.8.0 * @param mixed $value * @return boolean */ public static function isCcnum($value) { require_once 'Zend/Validate/Ccnum.php'; $validator = new Zend_Validate_Ccnum(); return $validator->isValid($value); }