CodeIgniter Forums

Full Version: Validation valid_date min and max
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
valid_date could accepts more parameters with min and max values required to do not fail.

Something like valid_date(m-d-Y,-100 year,-13 year):

- date must have the valid format m-d-Y
- date must be newer than 100 years ago
- date must be older than 13 years ago

or more specific  valid_date(m-d-Y H:i:s,01-15-2018 09:00:00):

- date must have the valid format m-d-Y H:i:s
- date must be newer than 01-15-2018 08:00:00
- no max (or present?)

* well, a possible issue with commas could happen, seen now.