mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 10:40:24 +02:00
471 B
471 B
MinimumAge
This is going to be deprecated, please use Age instead.
v::minimumAge(int $age)
v::minimumAge(int $age, string $format)
Validates a minimum age for a given date.
v::minimumAge(18)->validate('1987-01-01'); //true
v::minimumAge(18, 'd/m/Y')->validate('01/01/1987'); //true
Using date()
before is a best-practice.
Message template for this validator includes {{age}}
.
See also: