I'm quite new to Grails, and am using the tag for my input fields within a registration form.
I can quite happily link it up to the controller as required, but was wondering what the correct way to perform basic validation on the client before allowing sending to the server was?
For instance, if I wanted a real time username check performed on my username input field, I only want to start requesting a check from the server once i'd performed some basic client side validation such as minimum field length, etc.
Is there a best practice/established way for this?
I noticed there was a 'before' handler on the field but can't see if you can intercept it here?
[edit] I'm using grails 2.0 [/edit]
Thanks
You can use the 'before' handler on the remote field tag to specify the javascript function that should be called before making the ajax call. If the js function returns false, no ajax request is sent.