Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JQuery验证插件允许发布无效数据_Jquery_Jquery Validate - Fatal编程技术网

JQuery验证插件允许发布无效数据

JQuery验证插件允许发布无效数据,jquery,jquery-validate,Jquery,Jquery Validate,我的表格中有以下验证规则: function ValidadeRegistration() { $('#RegistrationForm').validate({ rules: { "auth.UserName": { required : true, email: true }, "auth.Password": { required : true,

我的表格中有以下验证规则:

function ValidadeRegistration() {
$('#RegistrationForm').validate({
    rules: {
         "auth.UserName": {
            required : true,
            email: true
        },
        "auth.Password": {
            required : true,
            minlenght : 5
        },
        PasswordConfirmation: {
            required: true,
            minlength: 5,
            equalTo: "#password"
        }
    },
    messages: {
        "auth.UserName": {
            email: 'Por favor digite um e-mail válido.',
            required: 'Campo e-mail obrigatório.'
        },
        "auth.Password": {
            required: 'Campo senha obrigatório.',
            minlength: 'A sua senha deve conter ao menos 5 caract$eacute;res.'    
        },
        "PasswordConfirmation": {
            required: 'Confirmação da senha é obrigatória.',
            equalTo : 'A senha não bate.'
        }
    }
});
}

当我在任何字段中有无效数据时,错误消息都会正确显示,插件会阻止帖子,但允许帖子的唯一条件是“auth.Password”字段中存在数据。如果我在这个字段中写了任何东西(它甚至不必在指定的长度内),插件将忽略所有其他错误和帖子


我做错了什么?

minlength
拼写错误:

当前:

    "auth.Password": {
        required : true,
        minlenght : 5
    },
更正:

    "auth.Password": {
        required : true,
        minlength : 5
    },

minlength
拼写错误:

当前:

    "auth.Password": {
        required : true,
        minlenght : 5
    },
更正:

    "auth.Password": {
        required : true,
        minlength : 5
    },

验证密码的minlength拼写错误。如果这被纠正了,它能工作吗?谢谢!不用说,我现在觉得自己很愚蠢!好吧,我承认:我是一个智能感知成瘾者。auth.Password的长度拼写错误。如果这被纠正了,它能工作吗?谢谢!不用说,我现在觉得自己很愚蠢!好吧,我承认:我是一个智力上瘾者