Lift is the most powerful, most secure web framework available today. Lift strongly supports the server side validation in various ways. Lets talk about the Client side validation in the Lift application on Ajax forms.
jQuery validation plug-in widely used for client side form validation and this makes it easy. The plug-in comes bundled with a useful set of validation methods.
Here is the steps to start with code:
- Ajax form html template
- Apply jQuery validation on form (Add following in the js file)
- Snippet to process Ajax form
The alert dialogue would not appear until form is validated.
Validation messages will look like : (you can style it as you want)