Yeah, you are right. But javascript generated by struts validator does not support indexed fields. Most of our jsps requires that. Also for locale specific validation we have to define separate formset for each country. Looks like validation file will become too large and difficult to maintain.
-----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Saturday, November 26, 2005 4:14 AM To: user@struts.apache.org Subject: Re: Strategy for javascript validation with i18n Kalra, Ashwani wrote: > Hi all, > In my multilingual project, I want to use my own custom Javascript > validation instead of one provided by strusts 1.1 I have to do this > because its not working in many cases with weblogic workshop, > specially the indexed fields. > > My main concern is How can I provide a simple java script API which > should take care 1. Getting the message from resource bundle 2. > Substituting the message parameters 3. Doing different validation for > different countries for the same field. For eg dd/mm/yyyy for UK, but > mm/dd/yyyy for US > > 1 and 2 can be done with I18n tag, but 3rd is looking to be difficult > as I want to use the common javascript method. > > Any have similar experience, please share with me. You might find it less work to figure out how to use validator correctly rather than re-writing the functionality from scratch. One point you may not be aware of is that validator does, in fact, already support locale-specific validation rules. In other words, your case 3 above is already supported by validator (as are cases 1 and 2). You just need to define separate validation rules for each locale you want to support in validation.xml. L. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]