hi Raza,
i am using struts2 validators... Here goes my validation.xml. here the firstname should be given a condition, like only if firstname is present in the
jsp page then the validation should happen, otherwise dont take the validation code... But the validation code for the firstname wll always be presernt in the validation.xml...
This is my requirement.. i think now you got a better understanding of the problem...
<validators>
<field name="firstName">
<field-validator type="requiredstring">
<message key="validator.requiredstring"/>
</field-validator>
<field-validator type="stringlength">
<param name="minLength">1</param>
<param name="maxLength">30</param>
<message key="validator.stringlength"/>
</field-validator>
</field>
<validators>