mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 02:30:06 +02:00
Merge branch '1.0'
This commit is contained in:
commit
7bc0cb94f3
|
@ -26,7 +26,7 @@ class MinimumAge extends AbstractRule
|
|||
|
||||
public function validate($input)
|
||||
{
|
||||
if (!is_int($this->age)) {
|
||||
if (!filter_var($this->age, FILTER_VALIDATE_INT)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ class MininumAgeTest extends \PHPUnit_Framework_TestCase
|
|||
[18, 'Y-m-d', '1969-07-20'],
|
||||
[18, null, new \DateTime('1969-07-20')],
|
||||
[18, 'Y-m-d', new \DateTime('1969-07-20')],
|
||||
['18', 'Y-m-d', '1969-07-20'],
|
||||
[18.0, 'Y-m-d', '1969-07-20'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue