Go to file
Henrique Moody 47f21596a5
Fix casting error in AbstractInterval classes
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>
2018-07-28 05:01:58 +02:00
docs Make clear that "Alnum" rule accepts whitespaces 2018-07-01 14:27:41 +02:00
library Fix casting error in AbstractInterval classes 2018-07-28 05:01:58 +02:00
tests Fix casting error in AbstractInterval classes 2018-07-28 05:01:58 +02:00
.gitignore Add "composer.lock" to the .gitignore list 2015-10-17 14:10:41 -03:00
.php_cs Use short array syntax 2015-10-17 22:56:32 -03:00
.scrutinizer.yml Use PSR-2 standard 2015-01-08 00:44:12 -02:00
.travis.yml Run PHP 7.1 on Travis 2016-08-03 09:41:33 +02:00
CHANGELOG.md Update "CHANGELOG.md" file 2016-04-23 22:11:23 -03:00
composer.json Update composer.json 2018-06-20 23:25:11 +03:00
CONTRIBUTING.md Update contributing guidelines 2015-11-18 05:47:35 -02:00
couscous.yml Add Google Analytics tracking ID to "couscous.yml" 2015-02-18 08:49:05 -02:00
LICENSE.md Create "CHANGELOG.md" file 2015-10-07 02:56:23 -03:00
phpunit.xml.dist Create "SubdivisionCode" rule 2015-09-21 13:54:02 -03:00
README.md Revert "Add link to support issues." 2018-05-19 16:17:52 +02:00

Respect\Validation

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

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+

Table of contents