mirror of
https://github.com/Respect/Validation.git
synced 2024-06-26 09:10:08 +02:00
There is some confusion about integer literals (as we type them into source code) and integer values (the actual value they represent). When casting the integer 08 (without quotes), PHP triggers an error as integers starting with 0 should have base 8. However, when casting the string '08' as an integer PHP returns the integer 8. This commit will change the behavior of the "IntVal" rule, allowing it to accept any integer type and any representation of an integer as a string. Reviewed-by: Emmerson Siqueira <emmersonsiqueira@gmail.com> Reviewed-by: Wesley Victhor Mendes Santiago <w.v.mendes.s@gmail.com> Co-authored-by: Henrique Moody <henriquemoody@gmail.com> |
||
---|---|---|
.. | ||
Exceptions | ||
Helpers | ||
Rules | ||
FactoryTest.php | ||
ValidatorTest.php |