0
我希望对特定字段上的特定错误有不同的位置。 我尝试的是下一个位置,但errorPlacement仅仅在第一次时才正确定位错误标签并保持该位置,当验证错误得到修复时使其内容为空。 (所以它不会重新定位只有当先前从DOM手动删除标签错误)JQuery验证器针对特定规则的特定错误的特定位置(errorPlacement不重新定位错误)
errorPlacement: function(error, element) {
if (error.text() == 'specific error from a specific rule') {
///position error in the bottom off the form
}
else {
//position error in the default place as for all field errors
}
},