Posted By:
Sheetal_Phatak
Posted On:
Tuesday, June 24, 2003 12:40 AM
I am trying to use struts internal validation mechanism using the validator-rules.xml and my validation.xml files On an action class my Enquiry.jsp gets called which is mapped to the EnquiryForm.java. There is a save button on which the SaveEnquiryAction.java is called. Now I want to validate my form fields. I wrote a validate method in my EnquiryForm.java and let it extend ValidatorForm. But somehow the validate method gets called when the form is loaded and not on click of the save button. In the struts-config.xml I tried to put validate="false" when the form gets loaded and validate="true" for the SaveEnquiryAction.java But still the validate is getting called on
More>>
I am trying to use struts internal validation mechanism using the validator-rules.xml and my validation.xml files
On an action class my Enquiry.jsp gets called which is mapped to the EnquiryForm.java.
There is a save button on which the SaveEnquiryAction.java is called. Now I want to validate my form fields.
I wrote a validate method in my EnquiryForm.java and let it extend ValidatorForm.
But somehow the validate method gets called when the form is loaded and not on click of the save button.
In the struts-config.xml I tried to put validate="false" when the form gets loaded and validate="true" for the SaveEnquiryAction.java
But still the validate is getting called on form load and not on save. :(
Can anyone help?
<<Less