CodeIgniter Forums
help - how to validate a date field? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: help - how to validate a date field? (/thread-27644.html)



help - how to validate a date field? - El Forum - 02-16-2010

[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


help - how to validate a date field? - El Forum - 02-16-2010

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


help - how to validate a date field? - El Forum - 02-16-2010

[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.