mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 08:42:15 +02:00
a039d6d4b9
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> |
||
---|---|---|
docs | ||
library | ||
tests | ||
.gitignore | ||
.php_cs | ||
.scrutinizer.yml | ||
.travis.yml | ||
CHANGELOG.md | ||
composer.json | ||
CONTRIBUTING.md | ||
couscous.yml | ||
LICENSE.md | ||
phpunit.xml.dist | ||
README.md |
Respect\Validation
The most awesome validation engine ever created for PHP.
- Complex rules made simple:
v::numeric()->positive()->between(1, 255)->validate($input)
. - Granularity control for advanced reporting.
- More than 100 (fully tested) validators.
- A concrete API for non fluent usage.
- Works on PHP 5.4+ or HHVM 3.3+
Documentation
Documentation can be found in https://respect-validation.readthedocs.io and also in the docs/ folder.