Dear Friends
Thank you very much for your attention; I checked both 'validate="true" ' and also 'empty spaces', they didn't solve the problem. Actually the part of 'if (!errors.isEmpty())' returns false all the time(see below, section 4). My previous project is already working properly with 'validate="false"', but this one.... :( Again any help would be appreciated Thank you Nafise -----Original Message----- From: Mailing List [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 3:25 PM To: '[EMAIL PROTECTED]' Subject: I Wondor Why Validation Doesn't Validate Dear All, I did the follow steps for setting validation, but there is no error on an empty field checking 'chequeNumber' (see below plz). 1. Placing the validation.xml & validator-rules.xml in WEB-INF folder 2. In struts-config.xml : a. <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/struts/validator-rules.xml, /WEB-INF/struts/validation.xml" /> </plug-in> b. <form-bean name="CreditStudentForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="chequeNumber" type="java.lang.String"/> <form-property name="studentId" type="java.lang.Integer" /> <form-property name="dispatch" type="java.lang.String" /> </form-bean> c. <action path="/creditStudent" parameter="dispatch" type="com.pdpsoft.lms.struts.action.CreditStudentAction" name="CreditStudentForm" validate="false" scope="session"/> 3. In validation.xml : <form name=" CreditStudentForm "> <field property=" chequeNumber " depends="required"> </field> </form> 4. In Action: ActionErrors errors = dynaForm.validate(mapping, request); if (!errors.isEmpty()) { //this if is never true :( saveErrors(request, errors); return mapping.findForward("aForward"); } 5. In jsp: <html:errors/> I appreciate any help or idea. Regards, Nafise --------------------------------------------------------------------- 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]