• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

javascript – bootcss验证插件sco.valid.js

php 搞代码 4年前 (2022-01-25) 14次浏览 已收录 0个评论
文章目录[隐藏]
<code>$('#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) {                ti<em style="color:transparent">本文来源gao.dai.ma.com搞@代*码#网</em><a>搞代gaodaima码</a>psOp(response.data,response.status);                if(response.url){                    setTimeout(function(){window.location.href=response.url;},3000);                }            }    });</code>

就是这个验证,
我现在想改成,光标离开的时间只需验证,不知道怎么改!?

回复内容:

<code>$('#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);                }            }    });</code>

就是这个验证,
我现在想改成,光标离开的时间只需验证,不知道怎么改!?


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:javascript – bootcss验证插件sco.valid.js
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址