I am working on grails project where I need to apply server side validations.
For client side validations I have created basic validation.js file which contains all the javascript functions.
Now what should be the ideal way to achieve the server side validation using Ajax, to achieve the validations like Record Duplication check.
Thanks in advance….
I’d recommend reversing your approach and using the Remote Constraints plugin: http://grails.org/plugin/remote-constraints
It lets you write your validation on the server side (as Domain class constraints) and then generate client side ajax validation so a message is shown when the user tabs off an input field.
cheers
Lee