BUGFIX: fix error location for radio fields. Fixes #5635 and #6846.

This commit is contained in:
Will Rossiter 2012-04-14 22:43:02 +12:00
parent bb1c4d8043
commit 965d8d00b0

View File

@ -469,6 +469,13 @@ class UserDefinedForm_Controller extends Page_Controller {
$("#Form_Form").validate({
ignore: [':hidden'],
errorClass: "required",
errorPlacement: function(error, element) {
if(element.is(":radio")) {
error.insertAfter(element.closest("ul"));
} else {
error.insertAfter(element);
}
},
messages:
$messages
,