0
我有2種形式的網頁「註冊」類「SUP」和「登錄」類「SI」, 我用類來創建自舉模式:自舉驗證與多發性形式
$(".si").click(function (e) {
e.preventDefault();
$(".si_section").show();
$(".sup").hide();
$(".modal-header h4 span").html("@Resources.SignIn");
});
他們有一些共同的領域。用戶名,密碼...
所以我加載scipts調用bootstrapvalidator爲他們每個人:
$('#form-login').bootstrapValidator({
framework: 'bootstrap',
feedbackIcons: {
//valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
use_email: {
validators: {
notEmpty: {
message: '@Resources.required'
},
emailAddress: {
message: '@Resources.loginfailuremessage'
}
}
},
use_password: {
validators: {
notEmpty: {
message: '@Resources.required'
}
}
}
}
});
// Form validator for registration
$('form-registration').bootstrapValidator({
framework: 'bootstrap',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
use_email: {
validators: {
notEmpty: {
message: '@Resources.required'
},
emailAddress: {
message: '@Resources.loginfailuremessage'
}
}
},
Password: {
validators: {
notEmpty: {
message: '@Resources.required'
},
emailAddress: {
message: '@Resources.loginfailuremessage'
}
}
}
}
})
但它不'噸工作,只有第一個是驗證,什麼是我的錯?我該怎麼做 ?謝謝