Jsp code for validating email address
In order to do form validation without Validator framework, one has to use validate() method of the form bean (Action Form class) to perform this task.
The phone number must be a number with more than eight digits but no more that 11 digits.However, when we need to validate a more particular type input, we have the possibility of creating our own, custom validation logic.In this article, we'll do just that – we'll create a custom validator to validate a form with a phone number field, then show a custom validator for multiple fields.The definitions in this file use the logical names of Form Beans from the file along with the logical names of validation routines from the file to tie the two together.
Using the Validator framework involves enabling the Validator plug-in, configuring Validator’s two configuration files, and creating Form Beans that extend the Validator’s subclasses.
Create a simple java class and make it implement a pre defined interface so called 'Validator'.