showing results for - "bootstrap validator password and confirm password"
Tom
13 Sep 2018
1//Declarative Usage
2<form id="identicalForm" class="form-horizontal"
3    data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
4    data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
5    data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
6
7    <div class="form-group">
8        <label class="col-sm-3 control-label">Password</label>
9        <div class="col-sm-5">
10            <input type="password" class="form-control" name="password"
11                data-bv-identical="true"
12                data-bv-identical-field="confirmPassword"
13                data-bv-identical-message="The password and its confirm are not the same" />
14        </div>
15    </div>
16
17    <div class="form-group">
18        <label class="col-sm-3 control-label">Retype password</label>
19        <div class="col-sm-5">
20            <input type="password" class="form-control" name="confirmPassword"
21                data-bv-identical="true"
22                data-bv-identical-field="password"
23                data-bv-identical-message="The password and its confirm are not the same" />
24        </div>
25    </div>
26</form>
27
28<script>
29$(document).ready(function() {
30    $('#identicalForm').bootstrapValidator();
31});
32</script>
33
34
35
36//Htmk Usage
37<form id="identicalForm" class="form-horizontal">
38    <div class="form-group">
39        <label class="col-sm-3 control-label">Password</label>
40        <div class="col-sm-5">
41            <input type="password" class="form-control" name="password" />
42        </div>
43    </div>
44
45    <div class="form-group">
46        <label class="col-sm-3 control-label">Retype password</label>
47        <div class="col-sm-5">
48            <input type="password" class="form-control" name="confirmPassword" />
49        </div>
50    </div>
51</form>
52
53$(document).ready(function() {
54    $('#identicalForm').bootstrapValidator({
55        feedbackIcons: {
56            valid: 'glyphicon glyphicon-ok',
57            invalid: 'glyphicon glyphicon-remove',
58            validating: 'glyphicon glyphicon-refresh'
59        },
60        fields: {
61            password: {
62                validators: {
63                    identical: {
64                        field: 'confirmPassword',
65                        message: 'The password and its confirm are not the same'
66                    }
67                }
68            },
69            confirmPassword: {
70                validators: {
71                    identical: {
72                        field: 'password',
73                        message: 'The password and its confirm are not the same'
74                    }
75                }
76            }
77        }
78    });
79});
queries leading to this page
bootstrap validate confirm passwordpassword and confirm password validation using bootstrapbootstrap password password validationconfirm password valiation bootstrapconfirm password bootstrapconfirm password validation in bootstrap formvalidation of password and confirm password in bootstrap 5bootstrap confirm passwordverify password using boostrapbootstrap password and confirm password validationhow to validation password and confirm password in bootstrap 5bootstrap validator password and confirm passwordpassword validator in bootstrapboostrap passwor match controlhow to validation password and confirm password in bootstrappassword and confirm password validation in bootstrapbootstrap4 password validationbootstrap validator password patternvalidation bootstrap password 4password and confirm password validation in jquery bootstrapbootstrap generate passwordpassword and confirm password bootstrapvalidate password bootstrapbootstrap password validationhow to create a confirm password in bootstrap 4 formpassword and confirm password bootstrap validationpassword and confirm password validation bootstrapvalidator password and confirm password in jquery bootstrapbootstrap password confirmation validationbootstrap form both password matchidentical bv validationbootstrap password match and confirm passwordhow to validation password and confirm password in bootstrap5how to validate password in javascript bootstrapbootstrap validation password matchhow to validate password using bootstrapbootstrap validator confirm password examplehow to do a confirm password validation with bootstrapbootstrap confirm password formbootstrap validate passwordconfirm password validation bootstrapbootstrap form validator password matchbootstrap confirm password examplebootstrap 4 password validationbootstrap confirm password validationbootstrap validator password and confirm password