DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38685>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38685 Summary: Error Message '{field} is not in the range null through null' in validator framework Product: Commons Version: unspecified Platform: Sun OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Validator AssignedTo: commons-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I am using struts 1.2.8. We are using the jar files from the Struts-Blank.war provided at the apache site. We are using the validator framework for performing the client & Server validations. When I use the 'intRange' or 'minlength'. It performs the validations correctly but it displays incorrect message as 'Test is not in the range null through null' or 'Test2 can not be less than null characters.' Partial Code in the validator.xml file -------------------------------- <!-- Test for Required & valid integers only and within the specifed range --> <field property="test" depends="required,integer,intRange"> <arg0 key="billForm.test"/> <arg1 key="${var:min}" name="intRange" resource="false"/> <arg2 key="${var:max}" name="intRange" resource="false"/> <var> <var-name>min</var-name> <var-value>10</var-value> </var> <var> <var-name>max</var-name> <var-value>50</var-value> </var> </field> <!-- Test2 for Required & minimum length --> <field property="test2" depends="required,minlength"> <arg0 key="billForm.test"/> <arg1 key="${var:minlength}" resource="false"/> <var><var-name>minlength</var-name><var-value>3</var- value></var> </field> Partial Code in validitor-rules.xml ----------------------------- <validator name="required" classname="org.apache.struts.validator.FieldChecks" method="validateRequired" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest" msg="errors.required"/> <validator name="minlength" classname="org.apache.struts.validator.FieldChecks" method="validateMinLength" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest" depends="" msg="errors.minlength" jsFunction="org.apache.commons.validator.javascript.validateMinLength"/> <validator name="intRange" classname="org.apache.struts.validator.FieldChecks" method="validateIntRange" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest" depends="integer" msg="errors.range"/> Partial View Source Code of HTML/Javascript generated ====================================================== function EmpApproBillFormBean_intRange () { this.a0 = new Array("test", "Test is not in the range null through null.", new Function ("varName", "this.min='10'; this.max='50'; return this [varName];")); } Please let me know why does the msg display 'null through null', instead of '10 through 50'. Regards, Yugandhar -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]