-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
129 lines (107 loc) · 4.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo 2 | Javascript Validator</title>
</head>
<body>
<div class="col-md-8" align="center" style="margin-left: 20%">
<div class="title"><h2>Input Client Information</h2></div>
<form method="POST" id="clientAdd" novalidate>
<div class="">
<div class="row">
<label for="name" style="align-items: baseline">Name</label>
<input type="text" required class="form-control" data-allowSpecial="_" data-allow="onlyAlpha" id="name"
name="name" placeholder="Enter Name">
</div>
<br><br><br><br><br><br><br>
<div class="row">
<label for="name">Address1</label>
<input type="text" required class="form-control" pattern="[a-z]" id="l_address" name="l_address"
placeholder="Enter address1">
</div>
<br><br><br><br><br><br><br>
<div class="row">
<label for="name">Address2</label>
<input type="text" required class="form-control" id="p_address" name="p_address"
placeholder="Enter Address2">
</div>
<br><br><br><br><br><br><br><br>
<div class="row">
<label for="name">Contact Person</label>
<input type="text" required class="form-control" id="contact_person" name="contact_person"
placeholder="Enter Contact Person">
</div>
<br><br><br><br><br><br><br><br><br>
<label for="name">Phone No 1</label>
<input type="text" required class="form-control" id="contact_no1" name="contact_no1"
placeholder="Enter Phone No">
<div class="row">
<label for="name">Phone No 2 </label>
<input type="text" class="form-control" pattern="[0-9.]" id="contact_no2" name="contact_no2"
placeholder="Enter Phone No">
</div>
<br><br><br><br><br><br><br>
<label for="name">Email Address 1</label>
<input type="email" required class="form-control" id="email1" name="email1" placeholder="Enter Email">
<div class="row">
<label for="name">Email Address 2</label>
<input type="text" class="form-control" id="email2" name="email2" placeholder="Enter Email">
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<label for="name">Designation</label>
<input type="text" required class="form-control" id="designation" name="designation"
placeholder="Enter Designation">
<div class="row">
<label for="name">Department</label>
<input type="text" required class="form-control" id="department" name="department"
placeholder="Enter Department">
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<div>
<label>Password</label>
<input type="password" name="name5" data-check="repassword" id="password" required>
</div>
<div>
<label>Re-Password</label>
<input type="password" name="name6" data-parent="password" id="repassword" required>
</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<label for="file">File</label>
<input type="file" required class="form-control" id="file" data-extensions="png,jpeg,jpg" name="file">
<br><br><br><br><br><br><br><br><br><br>
</div>
<div>
<label>Min :</label>
<input type="number" required min="2" max="10" minlength="1" maxlength="2" name="rangeTester">
</div>
<br><br><br><br><br><br><br>
<div>
<label>Length Chars :</label>
<input type="text" required min="4" max="50" data-maxlength="10" name="rangeTester">
</div>
<br><br><br><br><br><br><br>
<button type="submit" name="btn-save" class="btn btn-default">Submit</button>
</form>
</div>
<script src="./../js/formValidator.js"></script>
<script>
var form = new jsValidator();
form.init({
form: 'clientAdd',
forceFilter: true,
onChange: true,
errorClass: '__error_cap',
log: true,
message: {
required: 'This field is required.',
min: 'This field length is too low.',
max: 'This field length is exceeds the limit.',
password: 'Password does not match.',
email: 'Email is not valid.',
file: 'This file is not allowed.'
}
});
</script>
</body>
</html>