(Quick Reference)
renderValidationScript
This tag generates validation javascript for given Domain Class or Command Object. It has the following attributes:
- for: Required attribute. Specifies the validatable class (Domain Class or Command Object)
- also: Nested class support by specifying additional Domain Classes or Command Objects. Validation javascript will be generated for the classes specified (If the value is more than one use a comma separated list).
- not: Specifies properties that are ignored in client side validation (If the value is more than one, use a comma separated list).
- form: Multiple forms are supported by specifying the form ids.
- submitHandler: Optional attribute. Specifies the function name of an inline javascript function that is run to actually submit the form. Ideal for using AJAX form submission.
- errorClass, validClass, onsubmit, renderErrorsOnTop, errorContainer, errorLabelContainer, errorElement, errorWrapper(wrapper), highlight, unhighlight, onkeyup, qtip: When any of these attributes are specified, the specified value will take precedence over configuration. Applicable to current tag only.
errorContainer, errorLabelContainer, errorElement, errorWrapper(wrapper), highlight, unhighlight, onkeyup and qtip attributes supported since 1.3 released.
The added attributes in version 1.3 except qtip have equivalent options of the JavaScript validate method.
Please refer to the validate options documentation for more information.The qtip attribute is added to enabled or disabled the display of error message as qtip.
qtip is disabled (qtip = false) by default to support non-obtrusive error message display and
to make it possible to use the plugin in mobile HTML5 application.
Sample
<jqvalui:renderValidationScript
for="org.grails.jquery.validation.ui.Person"
also="homeAddress, workAddress"
not="homeAddress.number, workAddress.code"
form="personForm"
errorClass="invalid"
validClass="success"
onsubmit="false"
renderErrorsOnTop="true"
/>