respect-validation/tests
bmorg 34cbed2c9b
Allow leading zeros when using "IntVal" rule
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>
2020-07-21 21:40:38 +02:00
..
fixtures Update PHP support 2018-12-02 11:09:24 +01:00
integration Set timezone to UTC when testing date-related rules 2020-07-14 21:27:45 +02:00
library Update list of postal code validations 2020-05-18 22:22:38 +02:00
unit Allow leading zeros when using "IntVal" rule 2020-07-21 21:40:38 +02:00