|
8 | 8 | <meta http-equiv="x-ua-compatible" content="ie=edge">
|
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
10 | 10 | <link rel="stylesheet" type="text/css" href="css/sigup.css">
|
| 11 | + |
| 12 | + |
| 13 | + <!--JQuery Links--> |
| 14 | + <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> |
| 15 | + <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script> |
| 16 | + <script> |
| 17 | + $(document).ready(function () { |
| 18 | + $("#signupform").validate({ |
| 19 | + rules: { |
| 20 | + email: { |
| 21 | + required: true |
| 22 | + }, |
| 23 | + password: { |
| 24 | + required: true, |
| 25 | + minlength:6 |
| 26 | + }, |
| 27 | + contact:{ |
| 28 | + required:true, |
| 29 | + minlength:10, |
| 30 | + maxlength:10, |
| 31 | + }, |
| 32 | + repassword:{ |
| 33 | + required:true, |
| 34 | + minlength:6, |
| 35 | + |
| 36 | + } |
| 37 | + }, |
| 38 | + messages: { |
| 39 | + email: { |
| 40 | + required: "Email is required" |
| 41 | + }, |
| 42 | + password: { |
| 43 | + required: "Password is required", |
| 44 | + minlength:"Password must be of at least 6 characters" |
| 45 | + }, |
| 46 | + contact:{ |
| 47 | + required: "Contact No. is required", |
| 48 | + minlength:"Provided length is not valid", |
| 49 | + maxlength:"Provided length is not valid" |
| 50 | + }, |
| 51 | + repassword:{ |
| 52 | + required:"Re-password is required", |
| 53 | + minlength:"Re-password must be same as Password", |
| 54 | + |
| 55 | + } |
| 56 | + }, |
| 57 | + submitHandler: function (form) { // for demo |
| 58 | + document.location.href = "home.html"; |
| 59 | + } |
| 60 | + }); |
| 61 | +}); |
| 62 | + </script> |
| 63 | + |
| 64 | + |
11 | 65 | </head>
|
12 | 66 | <body class="align">
|
13 | 67 |
|
|
18 | 72 | <img src="images/icons8-registration-48.png">
|
19 | 73 | <h2>Sign Up</h2>
|
20 | 74 |
|
21 |
| - <form action="home.html" class="form"> |
| 75 | + <form action="home.html" class="form" id="signupform"> |
22 | 76 |
|
23 | 77 | <div class="form__field">
|
24 |
| - <input type="email" placeholder="Email"> |
| 78 | + <input type="email" placeholder="Email" name="email"> |
25 | 79 | </div>
|
26 | 80 |
|
27 | 81 | <div class="form__field">
|
28 |
| - <input type="tel" placeholder="Contact No." pattern="[0-9]{10}"> |
| 82 | + <input type="tel" placeholder="Contact No." pattern="[0-9]{10}" name="contact"> |
29 | 83 | </div>
|
30 | 84 |
|
31 | 85 | <div class="form__field">
|
32 |
| - <input type="password" placeholder="Password"> |
| 86 | + <input type="password" placeholder="Password" name="password"> |
33 | 87 | </div>
|
34 | 88 |
|
35 | 89 | <div class="form__field">
|
36 |
| - <input type="password" placeholder="Re-Password"> |
| 90 | + <input type="password" placeholder="Re-Password" name="repassword" > |
37 | 91 | </div>
|
38 | 92 |
|
39 | 93 | <div class="form__field">
|
40 |
| - <input type="submit" value="Sign Up"> |
| 94 | + <input type="submit" value="Sign Up"s> |
41 | 95 | </div>
|
42 | 96 |
|
43 | 97 | </form>
|
|
0 commit comments