I have written validators for 3 fields but only validation is happening for one field. Out of 3 fields the validation is happening only for "primDet.admissionDate" field. even though the the text fields are empty for the other 2, the validation is not happening.
The following is the xx-validation.xml file:- <!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.2//EN" " http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> <validators> <field name="primDet.admissionNo"> <field-validator type="regex"> <param name="regex"><![CDATA[\d{3,}]]></param> <message key="error.admission.no">Could not find error.admission.no !</message> </field-validator> </field> <field name="primDet.admissionDate"> <field-validator type="regex"> <param name="regex"><![CDATA[\d{2}/\d{2}/\d{4}]]></param> <message key="error.admission.date">Could not find error.admission.date</message> </field-validator> </field> <field name="primDet.applicationNo"> <field-validator type="regex"> <param name="regex"><![CDATA[\d{3}]]></param> <message key="error.admission.date">Could not find error.admission.date</message> </field-validator> </field> </validators> My jsp is as below:- <form id="form" method="post" action="primaryDetails.action"> <input type="text" class="text" size="15" name="primDet.admissionNo" /> <input type="text" class="text" style="color:#DDD4E7" value="dd/mm/yyyy" onclick="displayCalendar(event,this)" size="15" name="primDet.admissionDate"/> <input type="text" class="text" size="15" name="primDet.applicationNo"/> </form> what is the problem? why this is happening? kindly help? *Thanks and Regards,* Muralidhar Yaragalla. * *