我正在使用 JqueryformValidation
插件来验证我的表单。当我单击提交按钮时,一切正常,它在验证后提交表单。但是当我在键盘上按 Enter 键时,它仍然验证表单并且不提交表单并且表单值消失了。我需要在这里写代码吗?我想它正在工作,但没有听输入键被按下?
$('#login_form').formValidation({
message: 'This value is not valid',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
email: {
validators: {
notEmpty: {
message: 'The email address is required'
},
emailAddress: {
message: 'The input is not a valid email address'
}
}
},
password: {
validators: {
notEmpty: {
message: 'The password is required'
}
}
}
}
});