Can't seem to get this to work. Trying to do a confirm email bootstrap validator. The original email validator works but not the second. Not sure what I'm missing.
<div class="form-group">
<div class="col-md-11">
<label for="inputEmail" class="sr-only">Enter Email</label>
<input type="email" class="form-control" placeholder="Enter Email" id="email" name="email" size="35" required/>
<div class="help-block with-errors"></div>
<span class="glyphicon form-control-feedback" id="email1"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-11">
<input type="email" class="form-control" name="emailConfirmed" placeholder="Confirm Email" id="emailConfirmed" size="35" />
</div>
</div>
$('#form').validate({
fields: {
email: {
minlength: 3,
required: true,
validators: {
notEmpty: {
message: 'The confirm email is required and cannot be empty'
},
identical: {
field: 'emailConfirmed',
message: 'The email and its confirm are not the same'
}
}
},
emailConfirmed: {
validators: {
notEmpty: {
message: 'The confirm email is required and cannot be empty'
},
identical: {
field: 'email',
message: 'The email and its confirm are not the same'
}
}
}
}
});