mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 15:50:03 +01:00
473 B
473 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: