Forum: Ruby on Rails validates_dateness_of ?

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.
C728d93eb5205cf20cac0c2928b0ad62?d=identicon&s=25 Jeff Jones (rurounijones)
on 2006-03-23 15:22
Hello all.

I don't suppose some enterprising soul with much more skill than me has
whipped up a "validates_dateness_of" (Complete with leap year
calculations) method for use with all the other validation methods and
wishes to spread much much joy?

Cheers

Jeff "I can barely code RoR and rely on others to do the hard work"
Jones
92dafea96df3ff949b426b235a19ae0e?d=identicon&s=25 ChrisT (Guest)
on 2006-03-23 16:02
(Received via mailing list)
Think this is what you're looking for:
http://svn.viney.net.nz/things/rails/plugins/valid...
<http://svn.viney.net.nz/things/rails/plugins/valid...

Haven't used it but seems to do that and more

Chris T
C728d93eb5205cf20cac0c2928b0ad62?d=identicon&s=25 Jeff Jones (Guest)
on 2006-03-23 22:38
ChrisT wrote:
> Think this is what you're looking for:
> http://svn.viney.net.nz/things/rails/plugins/valid...
> <http://svn.viney.net.nz/things/rails/plugins/valid...
>
> Haven't used it but seems to do that and more
>
> Chris T

Excellent! My lazy self thanks you for the directions.

Jeff
631d1677786f0725da6ccee46043686e?d=identicon&s=25 Jonathan Viney (Guest)
on 2006-03-24 13:25
(Received via mailing list)
Yeah, validates_date_time will probably do what you're after. I'd be
interested in your feedback from using it. Any thoughts? Improvements?
Problems?

-Jonathan.
143d37bc67b04ad4fdc69beddda48651?d=identicon&s=25 Tom Taylor (Guest)
on 2006-03-24 15:56
(Received via mailing list)
Jonathan Viney wrote:
> Yeah, validates_date_time will probably do what you're after. I'd be
> interested in your feedback from using it. Any thoughts? Improvements?
> Problems?

Does it validate both Date and Time together? A datetime field in MySQL
for example.

Thanks!

Tom
631d1677786f0725da6ccee46043686e?d=identicon&s=25 Jonathan Viney (Guest)
on 2006-03-25 00:55
(Received via mailing list)
At the moment it does date and time separately. That's simply because
I haven't needed to validate a datetime input on a form yet. Feel free
to write patch if you like!

-Jonny.
This topic is locked and can not be replied to.