<snip> > >>>I have a form which the user >>>enters dates like '08/01/2002'. What is the best way to make sure this >>>format is entered. Should i use javascript here or regex? >> > > None of them, you should create a select/opt menu. > Then you even no need to check it, so you can put you focus > to avoid 31/02/2002 etc. >
This is correct, with the exception of date validation is still required in this instance as even with a set of pull downs the user can pick a date that *does not exist* (unless you want them to be able to)...such as 02/31/xxxx, this is always an invalidate but would pass regex check, etc. Check out Date::Calc on CPAN, it is beautiful for just about any date related stuff. Again you could handle this as well in javascript, but you seem concerned about that, so this is the perl solution... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]