Merge branch '0.8' into 0.9

This commit is contained in:
Henrique Moody 2015-11-04 15:13:07 -02:00
commit c521918fd0
2 changed files with 3 additions and 1 deletions

View file

@ -16,7 +16,7 @@ class MinimumAge extends AbstractRule
public function validate($input)
{
if (!is_int($this->age)) {
if (!filter_var($this->age, FILTER_VALIDATE_INT)) {
return false;
}

View file

@ -45,6 +45,8 @@ class MinimumAgeTest extends \PHPUnit_Framework_TestCase
array(18, 'Y-m-d', '1969-07-20'),
array(18, null, new \DateTime('1969-07-20')),
array(18, 'Y-m-d', new \DateTime('1969-07-20')),
array('18', 'Y-m-d', '1969-07-20'),
array(18.0, 'Y-m-d', '1969-07-20'),
);
}