Hi, I haven't been able to successfully use the Validator for doing Date validations with struts 1.1 b3.
I need to localize the date format. Since Validator would anyway take the default locale and the SHORT form of the date from the system, I have decided that I will use the short format in all Locales. But I am facing the following problems. 1. If I don't specify the "dateFormat" and/or "dateFormatStrict", I am getting JavaScript errors (msg: length is null or not defined..) in the 2nd line in the code below (from validator-rules.xml) var datePattern = oDate[x][2]("datePatternStrict"); if ((form[oDate[x][0]].type == 'text' || form[oDate[x][0]].type == 'textarea') && (value.length > 0) && (datePattern.length > 0)) { var MONTH = "MM"; var DAY = "dd"; var YEAR = "yyyy"; var orderMonth = datePattern.indexOf(MONTH); var orderDay = datePattern.indexOf(DAY); var orderYear = datePattern.indexOf(YEAR); 2. Validator seems to be using a fixed date format (last 6 lines in the code above). How can the JavaScript take care of other locales/formats? Do I need to change the JavaScript per installation basis or Do I need to download a different version of struts jar? What exactly is required to achieve localization. IMP: As far as possible, I would like to avoid specifying the "dateFormat"/"dateFormatStrict" in validator-rules.xml since I want to use the default locale's SHORT form. Thanks, Suresh
**************************Disclaimer************************************************** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ****************************************************************************************
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>