(Quick Reference)

1 Overview - Reference Documentation

Authors: Lim Chee Kin

Version: 1.4.4

1 Overview

Grails Validation mechanism is great, I like it! However, it is just a server side validation solution. To build a comprehensive validation solution and highly interactive web application it has one missing important piece… Yes! It is client side validation solution that support all standard Grails constraints. Similar grails plugins such as Javascript Validator and Remote Constraints attempt to address this problem, but the outcome is less than satisfactory in my opinion. I like the solution and demo published in the blog post titled A jQuery inline form validation, because validation is a mess, but unluckily it is not using the excellent JQuery Validation plugin as it's validation engine. It had it's own solution known as jQuery Validation Engine.

The JQuery Validation UI Plugin brings Javascript Validator, Remote Constraints, Custom Constraints, jQuery Validation plugin, and qTip (jQuery tooltip plugin) under the same root and delivers a solution that is more than the jQuery Validation Engine. In short, when someone asks you what the JQuery Validation UI Plugin is, just show them the following code block:

Javascript Validator + Remote Constraints + Custom Constraints + jQuery Validation plugin + qTip 
> jQuery Validation Engine

I like the Grails's slogan: "The search is really over!"

1.1 Installation

Install the plugin into your project with the following command:

grails install-plugin jquery-validation-ui

Alternatively, declare a plugin dependency in the grails-app/conf/BuildConfig.groovy file:

plugins {

Replace latest.release above with the latest version number, or put it in your BuildConfig verbatim and compile your application and the latest version will be installed automatically.

1.2 Person Sample Application

If you are interested in the sample codes and screen shots I mentioned above, you can run the sample application in your own machine by installing it to your project using the following command:

grails install-sampleapp

The command above not supported since 1.3 released, you may download the sample app created for Grails 1.3.9 using Grails standard theme or Grails 2.1.0 using Twitter Bootstrap theme.