Symfony\Component\Validator\Constraints\LuhnValidator
Validates a PAN using the LUHN Algorithm
For a list of example card numbers that are used to test this
class, please see the LuhnValidatorTest class.
- Author: Tim Nagel <t.nagel@infinite.net.au>
Synopsis
class LuhnValidator
extends ConstraintValidator
{
- // Inherited members from ConstraintValidator
- protected ExecutionContextInterface $context;
- // methods
- public void validate()
- // Inherited methods from ConstraintValidator
- public void initialize()
Hierarchy
Members
protected
Methods
public
- validate() — Validates a creditcard number with the Luhn algorithm.
Inherited from Symfony\Component\Validator\ConstraintValidator
public
- initialize() — {@inheritDoc}