PHP Class Respect\Validation\Rules\CreditCard

Inheritance: extends Respect\Validation\Rules\AbstractRule
Show file Open project: respect/validation

Public Properties

Property Type Description
$brand string

Public Methods

Method Description
__construct ( string $brand = null )
validate ( $input )

Private Methods

Method Description
verifyBrand ( string $input ) : boolean Returns whether the input matches the defined credit card brand or not.
verifyMod10 ( string $input ) : boolean Returns whether the input matches the Luhn algorithm or not.

Method Details

__construct() public method

public __construct ( string $brand = null )
$brand string Optional credit card brand

validate() public method

public validate ( $input )

Property Details

$brand public property

public string $brand
return string