SubFramework Validation in Struts2.0
Previous | Home | Next |
Validation subfranework is a set of predefine validations which encapsulates validation logic for common validation task. This framework consist of following components:-1.Validator:- Validator are predefine classes which contends validation logic for common validation.2.Validation MetaData:- Validation metadata is an XML file that assign a logic name to predefine.3.Validation Mapping:- Validation mapping is a XML file provide a application developer which associated action field to validator.4.Validation Interceptor:- This interceptor is responsible for applying validation on action properties using predefine validators.
Commonly used predefine validators:-Required:-The required validators is used to checked wether a field has some value or not. Empty string are considered value by this validators.Requiredstring:-Same as required accept empty string are not concerned value.Int ,double and date:-Are used to checked weather an integer, real, number or date is within range or not.Email:-This interceptor is used to checked weather a mailed is proper formate or not.URL :- The url interceptor is used to checked weather a url is proper formate or not.Stringlength:-The Stringlength is used to checked weather length of string lies within range or not.Regex:-The regex interceptor is used to checked value of a field using a regular expiration.
Previous | Home | Next |