Take a look at the maxlength definition inside validator-rules.xml. <validator name="maxlength" classname="org.apache.struts.validator.FieldChecks" method="validateMaxLength" methodParams="java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest" depends="" msg="errors.maxlength">
Does your "depends" specify "required"? -----Original Message----- From: Max Kremer [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 13:13 To: [EMAIL PROTECTED] Subject: maxlength validator implies required??? Hi, I'm using the maxlength validator as follows in validator.xml <field property="description" depends="maxlength"> <arg0 key="prompt.description"/> <arg1 name="maxlength" key="${var:maxlength}" resource="false"/> <var> <var-name>maxlength</var-name> <var-value>300</var-value> </var> </field> But for some reason when the field is left blank the validator returns a message that the field is required even though I am NOT using the required validator. Does maxlength IMPLY required???? Has anybody else experienced this behaviour? Regards, Max Kremer --------------------------------------------------------------------- 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]