views:

272

answers:

2

What is the use of DynaValidationForm in struts? I have read an article that it reduces the lines of code and complexity. Can anyone tell how it is so.

Thanks in advance

+1  A: 

The DynaValidatorForm validates form properties based on rules in XML and works best if you have a lot of "simple" rules, which is why it can reduce your own code.

See http://www.laliluna.de/struts-dynavalidator-form.html for a tutorial regarding DynaValidatorForm.

Magnus
+1  A: 

DynaValidatorForm is actually a subclass of DynaActionForm. It implements the validate() method much like the ValidatorForm and invokes the Commons Validator. DynaValidatorForm brings the capability of writing XML based validation rules for dynamic forms too.

DynaAcionForm and DynaValidatorForm are good tools for writing simple forms or prototyping Struts application by page authors without need to code in Java (like actions, forms, etc.)

cetnar