$('#registerForm').scojs_valid({ rules: { account : ['not_empty',{'min_length': 2},{'max_length': 20}], email : ['not_empty','email'], password : ['not_empty', {'min_length': 6}], confirmPassword :[{matches: 'password'}], code:['not_empty'] }, messages: { account: { not_empty: "請輸入註冊帳號", min_length: "帳號不少於2個字元", max_length: "帳號不能超過20個字元" }, email: { not_empty: "請輸入郵箱", email: "請輸入正確的郵箱" }, password: { not_empty: "請輸入登陸密碼,區分大小寫", min_length: "密碼太短了,至少要6位哦" }, confirmPassword:{ matches: "兩次輸入密碼不一致", }, code:{ not_empty: "請輸入驗證碼", } }, wrapper:'.form-group' ,onSuccess: function(response, validator, $form) { tipsOp(response.data,response.status); if(response.url){ setTimeout(function(){window.location.href=response.url;},3000); } } });
就是這個驗證,
我現在想改成,游標離開的時間只需驗證,不知道怎麼改!?
回複內容:
$('#registerForm').scojs_valid({ rules: { account : ['not_empty',{'min_length': 2},{'max_length': 20}], email : ['not_empty','email'], password : ['not_empty', {'min_length': 6}], confirmPassword :[{matches: 'password'}], code:['not_empty'] }, messages: { account: { not_empty: "請輸入註冊帳號", min_length: "帳號不少於2個字元", max_length: "帳號不能超過20個字元" }, email: { not_empty: "請輸入郵箱", email: "請輸入正確的郵箱" }, password: { not_empty: "請輸入登陸密碼,區分大小寫", min_length: "密碼太短了,至少要6位哦" }, confirmPassword:{ matches: "兩次輸入密碼不一致", }, code:{ not_empty: "請輸入驗證碼", } }, wrapper:'.form-group' ,onSuccess: function(response, validator, $form) { tipsOp(response.data,response.status); if(response.url){ setTimeout(function(){window.location.href=response.url;},3000); } } });
就是這個驗證,
我現在想改成,游標離開的時間只需驗證,不知道怎麼改!?