A couple of things - first of all read-up on struts server-side validation -
there are many references on the web on how to do this, so even if a user
turns off Javascript, things will get caught on the server side
validation.  

Secondly, I have found that having a single entry box where somebody would
enter a free text field where they would have to enter a / or a - will lead
to even more problems in validation.  Therefore, create 3 drop down boxes,
one for month, one for day and one for year, then, when somebody clicks "ok",
or "proceed", do a struts javascript validation on only one of the fields
(specify let's say month in validation.xml), and then during that javascript
or server-side validation, you combine the three fields (month, day and year)
to validate them all together as a single date.

Regards, Aleksandar.


On Tue, 25 Nov 2003 07:22:29 -0800, Rajat Pandit wrote
> hello,
> i guess this question has been asked a number of times, but ihavet 
> been able to get a consolidated answer for my questions. well here it 
> goes. i need to input dates, and have to do calculations based on 
> dates. i am using struts 1.1 and iBatis. i wrote a the same in jstl to 
> generate teh months, dates and years. but this is not enough. i need 
> this to be internationalized and also date validation.
> 
> i could use free text box and using validation.xml but then someone 
> can turn off javascript (my testing team does taht all the time :(( ).
> 
> is there some kind of bean or tag which generates the required 
> localized html input tags and also does validation like 31 feb is not 
> valid etc.
> 
> in there are none, can someone tell me how to validate dates (as in 31 
> feb is an invalid date, is there a method already in 
> java.util.Date/Calender/ etc.
> 
> thanks  in adv for ur inputs.
> best regards
> rajat
> 
> --
> 
> Rajat Pandit | [EMAIL PROTECTED]
> +91 612 3117606
> [ Developer and Part Time Human Being]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to