"we have javascript validation for client side.
we have got validate method in ActionForm class.
and Validator framework. why so different types for validation."
Hi Shreenivas, I am new to validator framework myself, so this wont be the experts opinion but heres my explanation...
The validator helps us to automate the client &/or server side validations. In case of client-side validations, if you implement the validator, it will generate all the javascript for you instead of you having to code in javascript. This saves your time & effort and for any future changes, its easy to modify the config & xml files.
For server-side validation, one way is to write the code in the validate method of form-bean. But again, if you use the validator, the form-bean class must extend ValidatorForm class (or DynaValidatorForm and so on), which automatically creates the validate method for you. so you do not need to code for the validate method yourself.
So, you can use any of the option you like for your code. I hope this was helpful.
- Meera.