Ich habe den folgenden Bootstrap identischen Validator auf meiner Seite verwendet. Ich habe gesucht und müde für das Passwort & bestätigen Passwort entspricht Großbuchstaben & Kleinbuchstaben auch. Aber ich habe nicht das erwartete Ergebnis bekommen. Bitte helfen Sie.Boostrap identischer Validator - pwd & bestätigen pwd entspricht oberen und unteren Fällen
http://formvalidation.io/validators/identical/
Eingang:
Passwort - Probe
bestätigen Passwort - Abgebildete
Ich möchte, dass identische Validator Passwort übereinstimmen (Probe) akzeptiert, wenn der Eingang obere oder Kleinbuchstaben ist.
Unten ist mein Code:
<form method="POST" action="" accept-charset="UTF-8" id="createAccount" class="fv-form fv-form-bootstrap" novalidate="novalidate">
<div class="form-group">
<div class="row">
<div class="col-sm-4 text-right">
<label for="password" class="control-label">Password *:</label>
</div>
<div class="col-sm-6 has-feedback">
<input class="form-control" maxlength="10" name="password" type="password" id="password">
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-4 text-right">
<label for="confirPassword" class="control-label">Confirm Password *:</label>
</div>
<div class="col-sm-6 has-feedback">
<input class="form-control" maxlength="10" name="confirmPassword" type="password">
<div id="error-id"></div>
</div>
</div>
</div>
<div class="form-group text-center">
<div class="row">
<div class="col-sm-12 text-center">
<button class="btn btn-success" type="submit" style="width:100px">Submit</button>
</div>
</div>
</div>
</form>
Dann in Bootstrap-Validator
<script type="text/javascript">
$(document).ready(function() {
$('#createAccount')
.formValidation({
framework: 'bootstrap',
icon: {
valid: 'glyphicon glyphicon-ok icon-success',
invalid: 'glyphicon glyphicon-remove icon-fail',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
password: {
row: '.col-sm-6',
validators: {
notEmpty: {
message: 'Password is required'
},
identical: {
field: 'confirmPassword',
message: 'The password and its confirm are not the same'
}
}
},
confirmPassword: {
row: '.col-sm-6',
validators: {
notEmpty: {
message: 'Confirm password is required'
},
identical: {
field: 'password',
message: 'The password and its confirm are not the same'
}
}
},
}
});
});
</script>