# date validations

**URL:** <https://discuss.rubyonrails.org/t/date-validations/6841>\
**Category:** rubyonrails-talk\
**Created:** [January 7, 2007, 9:37pm UTC](https://discuss.rubyonrails.org/t/date-validations/6841 "2007-01-07T21:37:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Athman](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Joe\_Athman](https://discuss.rubyonrails.org/u/Joe_Athman)\
**Post date:** [January 7, 2007, 9:37pm UTC](https://discuss.rubyonrails.org/t/date-validations/6841/1 "2007-01-07T21:37:47Z")

</div>

I have two parts of a question. First I have several dates in my app which aren't required, so I don't think I can use a date\_select right? There doesn't seem to be a way to give the user an option to \*not\* select a date.

So, assuming I need to just give the users a form field, anyone have a good piece of code for checking the validity of a date, allowing various forms, i.e.: 12.12.2007 12/12/2007 12-12-2007

Any suggestions?

Thanks, Joe.
