Class Luhn
Check if the input is valid by the Luhn algorithm
-
Wei\Base
-
Wei\Validator\BaseValidator
-
Wei\Validator\Luhn
Methods summary
protected
boolean
|
#
doValidate( mixed $input )
Validate the input value (ignore the $negative property)
Validate the input value (ignore the $negative property)
Parameters
- $input
- The input to be validated
Returns
boolean
|
protected
string
|
#
getChecksum( string $string )
Return the checksum char of luhn algorithm
Return the checksum char of luhn algorithm
Parameters
Returns
string
|
Methods inherited from Wei\Validator\BaseValidator
__invoke(),
addError(),
getErrors(),
getFirstMessage(),
getJoinedMessage(),
getMessages(),
getName(),
hasError(),
isString(),
isValid(),
loadTranslationMessages(),
setMessages(),
setName(),
storeOption()
|
Properties summary
protected
string
|
$invalidMessage
|
#
'%name% is not a valid number'
|