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 -- Posted via http://www.ruby-forum.com/.
Think this is what you''re looking for: http://svn.viney.net.nz/things/rails/plugins/validates_date_time <http://svn.viney.net.nz/things/rails/plugins/validates_date_time> Haven''t used it but seems to do that and more Chris T Jeff Jones wrote:> 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 > >
ChrisT wrote:> Think this is what you''re looking for: > http://svn.viney.net.nz/things/rails/plugins/validates_date_time > <http://svn.viney.net.nz/things/rails/plugins/validates_date_time> > > Haven''t used it but seems to do that and more > > Chris TExcellent! My lazy self thanks you for the directions. Jeff -- Posted via http://www.ruby-forum.com/.
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. On 3/24/06, Jeff Jones <rurounijones@hotmail.com> wrote:> > ChrisT wrote: > > Think this is what you''re looking for: > > http://svn.viney.net.nz/things/rails/plugins/validates_date_time > > <http://svn.viney.net.nz/things/rails/plugins/validates_date_time> > > > > Haven''t used it but seems to do that and more > > > > Chris T > > Excellent! My lazy self thanks you for the directions. > > Jeff > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060324/a09997ce/attachment.html
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
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. On 3/25/06, Tom Taylor <tom@tomtaylor.co.uk> wrote:> 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 >