mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 00:32:16 +02:00
47f21596a5
The classes that are children of "AbstractInterval" convert their values before comparing them. Because PHP tries to convert values when making comparisons and an "DateTime" object cannot be converted to integer or float some validations would result into PHP triggering an error like: > Object of class DateTime could not be converted to int > Object of class DateTime could not be converted to float This commit prevents that to happen by verifying if both compared values are scalar or not before comparing them with each other. 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+