私は Web 開発が初めてで、問題が非常に小さいことはわかっていますが、2 日経っても問題を見つけることができません。このコードを見て、私の間違いを指摘してください
ここに私のコードID @ JSFiddle ありがとう
HTML
<form id="registerForm" action="\register" method="post">
<div class="form-group">
<input class="form-control" type="text" name="email" placeholder="Email">
</div>
<div class="form-group">
<input class="form-control" type="password" name="pass1" placeholder="Password">
</div>
<div class="form-group">
<input class="form-control" type="password" name="pass2" placeholder="Confirm Password">
</div>
<button class="btn btn-primary" type="submit">Signup</button>
</form>
JS
$(document).ready(function () {
$('.registerForm').bootstrapValidator({
message: 'This value is not valid',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
email: {
validators: {
notEmpty: {
message: 'The email is required and cannot be empty'
},
emailAddress: {
message: 'The input is not a valid email address'
}
}
},
pass1: {
validators: {
identical: {
field: 'pass2',
message: 'The password and its confirm are not the same'
}
}
},
pass2: {
validators: {
identical: {
field: 'pass1',
message: 'The password and its confirm are not the same'
}
}
}
}
});
});