rickard2 / luhnar-validator
Symfony 2 validator to validate social security numbers
Installs: 6 041
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- rickard2/luhnar: 2.*
- symfony/validator: ~3.0|~4.0|~5.0|~6.0
Requires (Dev)
- phpunit/phpunit: ~9.0
README
Uses my Luhnar package to validate social security numbers in symfony.
PHP Component: https://github.com/rickard2/luhnar
JavaScript Equivalent: https://github.com/rickard2/luhnarjs
Usage example:
use Rickard2\LuhnarValidator\SocialSecurityNumber as SocialSecurityNumber; class Person { /** * @ORM\Column(name="socialSecurityNumber", type="string", length=13) * @SocialSecurityNumber(countryCode="SE") */ private $ssn; }