Struts 2 validation framework


Validation is a process of checking something against a standard.

Struts 2 validation framework:

Struts 2 validation framework provides many generic built-in validation methods or validators to perform various validations. It enables the web container to perform validation rules before executing the actions. We can also create custom validators.

Ways of performing validations in struts 2.

1. By using built-in validators.

Built-in validators in Struts 2 validation framework.

  1. required validator.
  2. requiredstring validator.
  3. validator.
  4. date validator.
  5. int validator.
  6. double validator.
  7. email validator.
  8. regex validator.
  9. url validator.

2. By using custom validators.   Next Topic: Struts 2 validation by built-in validators with example. Previous Topic: Struts 2 Redirect result type with example.


Please follow and like us:
Content Protection by