The problem is that you have set the validate attribute to false in the action mapping essentially turning off validation. This attribute should be set to true or omitted (in which case it defaults to true - I would recommend explicitly setting it to true to help others understand that validation is turned on). Do your ActionForms extend ValidatorForm instead of ActionForm? You were right in removing the validate method in your form beans. This will allow the validate method in the ValidatorForm class (which you extend) to be called and this method will then enforce the validation as per the rules in validation.xml.
----- Original Message ----- From: "Vijay Khanna" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 3:07 AM Subject: Struts--- Validator plugin HELP NEEDED!! > Hello to all struts users. > > I am facing somewhat unusual problem.The cuurent project is being built on > struts 1.1 > All the validations were earlier done is ACTIONFORMS.for good application > architecture we have decided to go for StrutsValidator/ Validator plugin > which will take care of all the validations. > > All common validations are being done using the validation.xml and > validator-rules.xml. > (minlength, maxlength, email, required) > for customised validation we have made validation-custom.xml and > validator-custom-rules.xml. > (field comparison etc) > > I have removed the Validate() from the ActionForm and set validation=false > in the action mapping of struts-config.xml(This was done later as we thought > setting to true invoked the validate().So we set it to validate=false, > inorder to invloke the plugin).When the application starts-up the digestor > reads the xml files and hold the validation in struts memory.All the error > messages are given in the resource file.But we don't understand the > validation is not occuring.We believe struts is not able invoke and passe it > to the plugin. > > Below is an extract from the struts-config.xml.The Tiles plugin works just > fine ..but Validator plugin does not work at all. > > <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> > <set-property property="pathnames" > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml,/WEB-INF/validat > ion-custom.xml,/WEB-INF/validator-custom-rules.xml"/> > </plug-in> > > > <plug-in className="org.apache.struts.tiles.TilesPlugin" > > <set-property property="definitions-config" > value="/WEB-INF/tiles-defs.xml" /> > <set-property property="definitions-debug" value="1" /> > <set-property property="definitions-parser-details" value="0" /> > <set-property property="definitions-parser-validate" value="true" /> > </plug-in> > > > > Any ideas from your guys...? > > Help is appreciated. > > thanx > Vijay > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.435 / Virus Database: 244 - Release Date: 12/31/2002 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

