|
|
@@ -12,9 +12,10 @@
|
|
|
<script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"></script>
|
|
|
<script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
|
|
|
<script type="text/javascript" src="../src/js/bootstrapValidate.js"></script>
|
|
|
+ <script type="text/javascript" src="../src/js/validator/identical.js"></script>
|
|
|
<script type="text/javascript" src="../src/js/validator/notEmpty.js"></script>
|
|
|
- <script type="text/javascript" src="../src/js/validator/stringLength.js"></script>
|
|
|
<script type="text/javascript" src="../src/js/validator/regexp.js"></script>
|
|
|
+ <script type="text/javascript" src="../src/js/validator/stringLength.js"></script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
@@ -39,10 +40,15 @@
|
|
|
<input type="password" class="form-control" name="password" placeholder="Password" />
|
|
|
</div>
|
|
|
|
|
|
+ <div class="form-group">
|
|
|
+ <input type="password" class="form-control" name="confirmPassword" placeholder="Retype password" />
|
|
|
+ </div>
|
|
|
+
|
|
|
<button type="submit" class="btn btn-primary">Sign up</button>
|
|
|
</form>
|
|
|
</div>
|
|
|
</section>
|
|
|
+ <!-- :form -->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -69,8 +75,30 @@ $(document).ready(function() {
|
|
|
},
|
|
|
email: {
|
|
|
validator: {
|
|
|
- emailAddress: {
|
|
|
- message: 'The value is not a valid email address'
|
|
|
+ notEmpty: {
|
|
|
+ message: 'The email address is required and can\'t be empty'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ password: {
|
|
|
+ validator: {
|
|
|
+ notEmpty: {
|
|
|
+ message: 'The password is required and can\'t be empty'
|
|
|
+ },
|
|
|
+ identical: {
|
|
|
+ field: 'confirmPassword',
|
|
|
+ message: 'The password and its confirm are not the same'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ confirmPassword: {
|
|
|
+ validator: {
|
|
|
+ notEmpty: {
|
|
|
+ message: 'The confirm password is required and can\'t be empty'
|
|
|
+ },
|
|
|
+ identical: {
|
|
|
+ field: 'password',
|
|
|
+ message: 'The password and its confirm are not the same'
|
|
|
}
|
|
|
}
|
|
|
}
|