Hi ,
In
struts validation.xml i have the following code.
<field property="emailId"
depends="isrequired,email,maxlength,validateEmail" page="1">
<arg0 key="global.prompt.emailaddress"/>
<arg1 key="${var:maxlength}" name="maxlength"
resource="false"/>
<var>
<var-name>maxlength</var-name>
<var-value>50</var-value>
</var>
</field>
I need to do the validation only if page =1. In action class before calling validator i am setting page =1. but validation is not happening. if i remove the page=1 then validation is happening.
Action class code follows.
profileForm.setPage(1);
ActionErrors errors = super.validateForm((ValidatorForm) form, mapping, request);
can any one help me on this