Re: Validation: Problem with datePattern and JavaScript
Well yes this quick fix work, i have added the following : var datePattern = oDate[x][2](datePatternStrict); if(datePattern == null) { datePattern = oDate[x][2](datePattern); } But the main problem is, the javascript code, afterwards still needs a strict input (e.g. 01.06.2000) and not checks if a not so strict pattern (e.g. 1.6.2000) is a valid date. So either someone already has coded the javascript, or else i'll do it Thanx Rouven From: Andy Schmidgall [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 7:15 PM Subject: RE: Validation: Problem with datePattern and JavaScript It looks like the following line of code (in the date validator rule in validator-rules.xml) loads the pattern: var datePattern = oDate[x][2](datePatternStrict); As far as I can tell, nothing is ever loaded for plain datePattern, and this matches up with my experiences of using datePattern (i.e. datePattern doesn't do any validation at all) I haven't tried this, but it should probably be an easy fix to check if oDate[x][2](datePattern) has a value and load that into datePattern. -Andy -Original Message- From: Zakaria khabot [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 12:00 PM To: Struts Users Mailing List Subject: Re: Validation: Problem with datePattern and JavaScript Hi, Do u have an example of using validate-rules.xml in a JSP file. Thanks - Original Message - From: Rouven Gehm [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:53 PM Subject: Validation: Problem with datePattern and JavaScript I want to know if someone has updated the javascript code in the validate-rules.xml, for the datePattern option ? Because the code i have from the Struts 1.1 zip only work with datePatternStrict !!! I have searched the user mailing list, for this problem, but not found any solution. Thanx Rouven - 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] - 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]
Re: Validation: Problem with datePattern and JavaScript
Hi, Do u have an example of using validate-rules.xml in a JSP file. Thanks - Original Message - From: Rouven Gehm [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:53 PM Subject: Validation: Problem with datePattern and JavaScript I want to know if someone has updated the javascript code in the validate-rules.xml, for the datePattern option ? Because the code i have from the Struts 1.1 zip only work with datePatternStrict !!! I have searched the user mailing list, for this problem, but not found any solution. Thanx Rouven - 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]
RE: Validation: Problem with datePattern and JavaScript
It looks like the following line of code (in the date validator rule in validator-rules.xml) loads the pattern: var datePattern = oDate[x][2](datePatternStrict); As far as I can tell, nothing is ever loaded for plain datePattern, and this matches up with my experiences of using datePattern (i.e. datePattern doesn't do any validation at all) I haven't tried this, but it should probably be an easy fix to check if oDate[x][2](datePattern) has a value and load that into datePattern. -Andy -Original Message- From: Zakaria khabot [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 12:00 PM To: Struts Users Mailing List Subject: Re: Validation: Problem with datePattern and JavaScript Hi, Do u have an example of using validate-rules.xml in a JSP file. Thanks - Original Message - From: Rouven Gehm [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 04, 2003 1:53 PM Subject: Validation: Problem with datePattern and JavaScript I want to know if someone has updated the javascript code in the validate-rules.xml, for the datePattern option ? Because the code i have from the Struts 1.1 zip only work with datePatternStrict !!! I have searched the user mailing list, for this problem, but not found any solution. Thanx Rouven - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]