Client-side validation in Lift using jQuery validation plugin

Table of contents
Reading Time: 2 minutes

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

Now, we need to validate ajax form by jQuery validation before sending it to server. The task is to add JavaScript call before submit.

The alert dialogue would not appear until form is validated.

Validation messages will look like : (you can style it as you want)

Selection_007

Discover more from Knoldus Blogs

Subscribe now to keep reading and get access to the full archive.

Continue reading