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.
Ae03102311939454d2b7f1ca3139fd97?d=identicon&s=25 Lindsay Boyd (Guest)
on 2006-02-22 16: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.