I''m getting errors whenever the user chooses, for example, April 31st ( since there is no 31st in April, navicat freaks out ), there MUST be a method that ruby has that would allow me to validate a date before I submit to navicat. I haven''t been able to find anything online about it either, it''s probably something simple, I just can''t figure it out. Thanks in advance, -- Posted via http://www.ruby-forum.com/.
2006/5/3, Randal Santia <randal@b2blogic.net>:> I''m getting errors whenever the user chooses, for example, April 31st ( > since there is no 31st in April, navicat freaks out ), there MUST be a > method that ruby has that would allow me to validate a date before I > submit to navicat. > > I haven''t been able to find anything online about it either, it''s > probably something simple, I just can''t figure it out.There''s a plugin "Validates date time" by J. Viney. Google (or the RoR wiki) is your friend. -- Jean-Fran?ois. -- ? la renverse.
This HAS to be a common problem. No one else suffering from it? Randal Santia wrote:> I''m getting errors whenever the user chooses, for example, April 31st ( > since there is no 31st in April, navicat freaks out ), there MUST be a > method that ruby has that would allow me to validate a date before I > submit to navicat. > > I haven''t been able to find anything online about it either, it''s > probably something simple, I just can''t figure it out. > > Thanks in advance,-- Posted via http://www.ruby-forum.com/.
Ok, obviously I''m way over-tired... I''ll just make an if statment to check if the month is one that has 30 days, and if the day is 31... ... and I''m gonna get some sleep -- Posted via http://www.ruby-forum.com/.