boolean validation question

25 views
Skip to first unread message

Dan Tanner

unread,
Jun 23, 2011, 6:22:41 PM6/23/11
to jquery-valida...@googlegroups.com
Hi,
This is my first usage of the plugin, and I've just hit one minor stumbling block so far...  

My domain class has a boolean property with no constraints on it, and by default it fails UI validation with a cannot be null error.  I can exclude this property from the jqvalui:renderValidationScript element to get things working, but this seems like an incorrect validation error, since it passes server-side validation.  

Is this a bug, or if not is there a way to globally configure this behavior?  e.g. Can I add a constraint configuration to the Config.groovy for booleans?

Thanks,
Dan

Chee Kin Lim

unread,
Jun 23, 2011, 7:21:54 PM6/23/11
to jquery-valida...@googlegroups.com
Hi Dan,

Thanks for using the plugin.

I think this is inconsistent behavior between the server-side and the plugin, you can turn off the validation by specify nullable:true for the field in the constraints closure of the domain class.

Best regards,
Chee Kin
Reply all
Reply to author
Forward
0 new messages