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

WBOY
풀어 주다: 2016-06-06 20:37:44
원래의
1177명이 탐색했습니다.

<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>
로그인 후 복사
로그인 후 복사

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

回复内容:

<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>
로그인 후 복사
로그인 후 복사

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

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!