https://blog.csdn.net/fn_2015/article/details/73498462
<script type="text/javascript" src="${ctx}/jquery-validation-1.17.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="${ctx}/jquery-validation-1.17.0/messages_zh.min.js"></script>
$().ready(function() {
$("#frmAdd").validate();
});
$().ready(function() {
$("#btadd").click(function(){
if($("#frmAdd").valid()){
save(); //验证必填成功后调用save()函数
}
});
});