respect-validation/tests
Henrique Moody a039d6d4b9
Fix wrong behavior of "Date" rule
The validation was considering "99" as a valid month and neither
date_parse_from_format() [1] or DateTime::createFromFormat() [2] would
complain about that.

The solution for that was to use checkdate() [3] to verify whether the
date is valid or not. Also, an extra step was added to the validation
that a date that only contains a day would return false since a day
without a month and year is impossible to validate.

Apparently, there is no problem while validation when it comes to time,
therefore nothing needed to be added for this validation.

[1]: http://php.net/date_parse_from_format
[2]: http://php.net/datetime.createFromFormat
[3]: http://php.net/checkdate

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-08-29 21:46:53 +02:00
..
fixtures Create "Image" rule 2015-12-14 10:14:26 -02:00
integration Fix wrong behavior when using templates 2018-07-02 07:57:21 +02:00
library/Rules Remove "malkusch/bav" as dependency 2018-01-02 21:45:22 +01:00
unit Fix wrong behavior of "Date" rule 2018-08-29 21:46:53 +02:00