http://www.position-relative.net/creation/formValidator/demos/demoValidators.html
http://www.cnblogs.com/aijun/archive/2011/03/21/1989991.html
去掉blur 验证事件
$("#Form").validationEngine({
maxErrorsPerField: 1, //显示最多1个error
binded: false //去掉绑定事件
});
$("#saveBtn").click(function () {
if ($("#Form").validationEngine("validate")) {
DoSomething
}
});
<script>
$(function () {</script>
----------------Some Js Sample
error: function (msg, elem) {
if (!elem || typeof (elem) != "object") {
elem = $(document.body);
}
debugger;
$(elem).validationEngine('showPrompt', msg, 'error', 'bottomRight', true);
$(elem).focus();
},
confirm: function (msg, elem) {
$(elem).validationEngine("showPrompt", msg, "pass", "centerRight", false);
},
validation: function (container) {
if (CRM.locale.code.length > 0) {
$.getScript("/js/libs/languages/jquery.validationEngine-" + CRM.locale.code + ".js", function () {
$.getScript("/js/libs/jquery.validationEngine.js", function () {
$.styles.add("/css/validationEngine.jquery.css");
if (CRM.common.Param_Defined(container)) {
$(container).find($("form")).validationEngine("attach");
} else {
$("form").validationEngine("attach");
}
});
});
}
},