This project is no longer maintained and no further public releases are planned.

No further support will be given.

Feel free to fork the git repository.

Date & Time

Using these error checks you can force the user to enter a valid date or time. You can even check for a valid date range.

Version added

1.0.0

Example code

validators {
  1.class = Validator\DefaultValidator
  1.config {
    fieldConf {
      birthdate.errorCheck {
        1 = dateRange
        1 {
           min = 1.1.1950
           max = 24.10.1995
           pattern = d.m.y
         }
      }
    }
  }
}

date

Checks if a field value is a valid date

time

Checks if a field value is a valid time

dateRange

Checks if a field value is between a configured date range

isOlderThan

Checks if a person is older than the specified number of years by parsing a given date.

isYoungerThan

Checks if a person is younger than the specified number of years by parsing a given date.