symfony/symfony — pull request #9212 by Richtermeister (2013-10-04 08:12:27+00:00)
Title: [Validator] Force Luhn Validator to only work with strings

The Luhn Validator fails to work with float or large integers (internally turned into float by php, depending on precision setting). This is problematic because developers might use number or integer form fields to capture credit card data, which will lead to a validation error even though the form input itself was valid. This commit makes validator throw UnexpectedTypeException on non-string input to avoid this confusion.

| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [yes]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets |
| License | MIT
| Doc PR |