Two Laptop Bag*
The moose likes Struts and the fly likes Validations in Form/Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validations in Form/Action" Watch "Validations in Form/Action" New topic

Validations in Form/Action

M Mehta
Ranch Hand

Joined: Aug 03, 2006
Posts: 92
In struts we can do the front end validations in the form by implementing the validate method of ValidatorForm, or the same validations can be put in the Action by creating new ActionMessages and populating the same with error messages to be shown.

can anyone tell me which is the preferred way?

I agree. Here's the link:
subject: Validations in Form/Action
Similar Threads
ValidatorActionForm Question?
Doubt in Action Form
DynaValidatorActionForm not working
Struts Validator Framework - using same formbean for different jsps
Validating some extra fields of action form not in my jsp?