• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

For struts form validation

 
Ashutosh kumar singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
any body can confirm that DynaActionForm in struts is necessary for form validation. can i do form validation through normal action form. because there is no actual coding in .net....
it's very urgent.........
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

Yes ...we can do Form Checking/Validation using simple Action Form's validate() method.

~ Abhay
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using DynaActionForm is just another way of doing Form Validation.
We can do it using simple Action Form's validate() method.

~ Abhay
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the DynaActionForm class has nothing at all to do with validation. It's just a way of dynamically declaring fields in an ActionForm without having to write a class.

What you're probably referring to is the Struts Validadion Frameork. That is accessed by having your ActionForm extend Validator form (or if you've been using DynaActionForm, use DynaValidatorForm instead) and then declaring the validations in a validator.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic