CodeIgniter Forums

Full Version: help - how to validate a date field?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Frank Rocco[/eluser]
Hello,

What is the best way to make sure a date entered is valid for mm/dd/yyyy?
I am using form_input

Thanks

Frank

El Forum

[eluser]Frank Rocco[/eluser]
Still not working.
Does anyone have an example of date validation?

El Forum

[eluser]Devon Lambert[/eluser]
Hey Frank,

You could try splitting out the date using explode().

Then once it's split, do a validation check on each array item.

Hope it helps.