Нужно добавить к rules , password , nick_name , email - регулярку .. Как правильно это сделать синтаксически ?
(function () {
$("#login-form").validate({
rules: {
nick_name: {
required:true,
minlength: 5
},
email: {
required: true
},
password: {
required:true,
rangelength:[8, 12],
number:true
}
},
messages : {
nick_name: {
required:"This field is required to be filled!",
minlength:"The minimum length of user-name 5 characters!"
},
email :{
required:"This field is required to be filled!"
},
password : {
required:"This field is required to be filled!",
rangelength:"The length of password must be 8-12 digits",
number:"Password must be a number!"
}
}
});
})();