forked from horprogs/Just-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
341 lines (333 loc) · 10.1 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Just-validate</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<style>
.form__radio,
.form__checkbox {
margin-right: 7px !important;
}
.flag {
width: 80px;
background-color: transparent;
border: 0;
}
.container {
max-width: 540px;
}
</style>
</head>
<body class="container pb-5">
<div class="mb-4">
<div class="row">
<button id="change-lang-btn-ru" class="flag">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 6">
<rect fill="#fff" width="9" height="3" />
<rect fill="#d52b1e" y="3" width="9" height="3" />
<rect fill="#0039a6" y="2" width="9" height="2" />
</svg>
</button>
<button id="change-lang-btn-en" class="flag">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30">
<clipPath id="s">
<path d="M0,0 v30 h60 v-30 z" />
</clipPath>
<clipPath id="t">
<path d="M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z" />
</clipPath>
<g clip-path="url(#s)">
<path d="M0,0 v30 h60 v-30 z" fill="#012169" />
<path
d="M0,0 L60,30 M60,0 L0,30"
stroke="#fff"
stroke-width="6"
/>
<path
d="M0,0 L60,30 M60,0 L0,30"
clip-path="url(#t)"
stroke="#C8102E"
stroke-width="4"
/>
<path d="M30,0 v30 M0,15 h60" stroke="#fff" stroke-width="10" />
<path d="M30,0 v30 M0,15 h60" stroke="#C8102E" stroke-width="6" />
</g>
</svg>
</button>
</div>
</div>
<form action="#" id="form" autocomplete="off">
<div class="row">
<div class="col">
<label for="name">Enter your name</label>
<input
type="text"
class="form__input form-control"
placeholder="Enter your name"
autocomplete="off"
name="name"
id="name"
/>
</div>
<div class="col">
<label for="email">Enter your email</label>
<input
type="email"
class="form__input form-control"
placeholder="Enter your email"
autocomplete="off"
name="email"
id="email"
/>
</div>
</div>
<div class="form-group mt-3">
<label for="password">Enter your password</label>
<input
type="password"
class="form__input form-control"
placeholder="Enter your password"
autocomplete="off"
name="password"
id="password"
/>
</div>
<div class="form-group mt-3">
<label for="password">Repeat your password</label>
<input
type="password"
class="form__input form-control"
placeholder="Repeat your password"
autocomplete="off"
name="repeat-password"
id="repeat-password"
/>
</div>
<div class="form-group mt-3">
<label for="password">Enter your message</label>
<textarea
name="msg"
cols="30"
rows="10"
class="form__textarea form-control"
id="message"
></textarea>
</div>
<div class="form-group mt-4">
<label for="favorite_animal_select" class="form-label"
>Select you favorite animal</label
>
<select name="pets" id="favorite_animal_select" class="form-select">
<option value="">--Please choose an option--</option>
<option value="dog">Dog</option>
<option value="cat">Cat</option>
<option value="hamster">Hamster</option>
<option value="parrot">Parrot</option>
<option value="spider">Spider</option>
<option value="goldfish">Goldfish</option>
</select>
</div>
<div class="form-group mt-4">
<div class="form-check">
<label class="form-check-label" for="consent_checkbox"
>I agree to provide the information</label
>
<input
type="checkbox"
id="consent_checkbox"
class="form-check-input"
/>
</div>
</div>
<div
class="form-group mt-4"
id="read_terms_checkbox_group"
style="width: 250px"
>
<div class="form-check">
<label class="form-check-label" for="read_terms_checkbox_group_1"
>I have read Privacy Policy</label
>
<input
type="checkbox"
name="checkbox-group-fruit"
id="read_terms_checkbox_group_1"
class="form-check-input"
/>
</div>
<div class="form-check">
<label class="form-check-label" for="read_terms_checkbox_group_2"
>I have read Terms Of Use</label
>
<input
type="checkbox"
name="checkbox-group-fruit"
id="read_terms_checkbox_group_2"
class="form-check-input"
/>
</div>
<div class="form-check">
<label class="form-check-label" for="read_terms_checkbox_group_3"
>I have read Cookies Policy</label
>
<input
type="checkbox"
name="checkbox-group-fruit"
id="read_terms_checkbox_group_3"
class="form-check-input"
/>
</div>
</div>
<div class="mt-4 form-group">
<div class="pb-1">
Please select the preferred way for communication
</div>
<div
class="form-check"
id="communication_radio_group"
style="max-width: 200px"
>
<input
type="radio"
name="radio"
class="form-check-input"
id="communication_radio_group_1"
/>
<label class="form-check-label" for="communication_radio_group_1">
Email
</label>
<br />
<input
type="radio"
name="radio"
class="form-check-input"
id="communication_radio_group_2"
/>
<label class="form-check-label" for="communication_radio_group_2">
SMS
</label>
</div>
</div>
<div class="d-grid mt-4">
<button class="btn btn-primary" id="submit-btn">Submit</button>
</div>
</form>
<form action="#" id="basic_form" autocomplete="off" class="mt-5">
<div class="row">
<div class="col">
<label for="basic_name">Enter your name</label>
<input
type="text"
class="form__input form-control"
placeholder="Enter your name"
autocomplete="off"
name="basic_name"
id="basic_name"
/>
</div>
<div class="col">
<label for="basic_email">Enter your email</label>
<input
type="email"
class="form__input form-control"
placeholder="Enter your email"
autocomplete="off"
name="basic_email"
id="basic_email"
/>
</div>
</div>
<div class="d-grid mt-4">
<button class="btn btn-primary" id="basic_submit-btn">Submit</button>
</div>
</form>
<form action="#" id="conditional_form" autocomplete="off" class="mt-5">
<div class="row">
<div class="col">
<label for="conditional_name">Enter your name</label>
<input
type="text"
class="form__input form-control"
placeholder="Enter your name"
autocomplete="off"
name="basic_name"
id="conditional_name"
/>
</div>
</div>
<div class="form-group mt-4">
<div class="form-check">
<label
class="form-check-label"
for="conditional_required_name_checkbox"
>Name is required</label
>
<input
type="checkbox"
id="conditional_required_name_checkbox"
class="form-check-input"
/>
</div>
</div>
<div class="d-grid mt-4">
<button class="btn btn-primary" id="conditional_submit-btn">
Submit
</button>
</div>
</form>
<form action="#" id="file_form" autocomplete="off" class="mt-5">
<div class="row">
<div class="col">
<label for="file_minmax">Upload your 1-3 files</label>
<input
type="file"
class="form__input form-control"
placeholder="Upload your file"
autocomplete="off"
name="file_minmax"
id="file_minmax"
multiple
/>
</div>
</div>
<div class="row">
<div class="col">
<label for="file_txt">Upload your 1 txt file</label>
<input
type="file"
class="form__input form-control"
placeholder="Upload your file"
autocomplete="off"
name="file_txt"
id="file_txt"
multiple
/>
</div>
</div>
<div class="row">
<div class="col">
<label for="file_advanced">Upload your files (txt, jpeg, max size 1000)</label>
<input
type="file"
class="form__input form-control"
placeholder="Upload your file"
autocomplete="off"
name="file_advanced"
id="file_advanced"
multiple
/>
</div>
</div>
<div class="d-grid mt-4">
<button class="btn btn-primary" id="file_submit-btn">Submit</button>
</div>
</form>
<script type="module" src="./src/example.ts"></script>
</body>
</html>