Forum: Ruby on Rails validates_format_of datetime?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lindsay B. (Guest)
on 2006-02-22 17:34
What's the best way to check a field to ensure it is a valid datetime? I
could validates_format_of :with a regular expression for "yyyy-mm-dd
hh:mm:ss", but I'm wondering if there is a more direct way to do this.
This topic is locked and can not be replied to.