Chariot Training Classes

Training Courses

I run Chariot's training and mentoring services. We provide training in AngularJS, HTML5, Spring, Hibernate, Maven, Scala, and more.

Chariot Education Services

Technology

Chariot Emerging Tech

Learn about upcoming technologies and trends from my colleagues at Chariot Solutions.

Resources

Chariot Conferences

Podcasts

Entries in plugins (1)

Tuesday
Mar172009

Interesting Plugin for Grails - javascript validation

Anyone who has programmed in Grails realizes the power of the domain-centric design pattern, including validation rules embedded as constraints in the Domain class.

Someone has written a plugin that dynamically generates Apache Commons Validator code on the fly.  It's called the javascript validator plugin and it is enabled in three steps:

Install the plugin:

grails install-plugin javascript-validator

Add to a given form with:

<jv:generateValidation domain="Employee" form="employeeForm">

Set up the form to include validation

<form id="employeeForm" onSubmit="return validateForm(this);" ... >

I'm going to give this a shot. Interesting how simple it could be to add client-side validation without re-architecting your whole code base. This is why Grails rocks!