-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate.html
374 lines (300 loc) · 13.6 KB
/
validate.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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Feldman</title>
<meta name="description" content="Barebones HTML project">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui">
<!-- Favicon block -->
<!-- Images generated from a single 260x260 image by http://realfavicongenerator.net/ -->
<link rel="shortcut icon" href="favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="60x60" href="apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="152x152" href="apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32">
<meta name="msapplication-TileColor" content="#d10d3f">
<meta name="msapplication-TileImage" content="mstile-144x144.png">
<meta name="msapplication-config" content="browserconfig.xml">
<!-- / Favicon block -->
<link rel="stylesheet" href="styles/main.css">
<!-- Cached build -->
<script src="scripts/vendor/modernizr-2.8.3.min.js"></script>
<!-- /
<!-- -->
<style>
.page-preloader {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: #fff;
z-index: 9999991005000;
}
.page-preloader .preloader-itself {
width: 110px;
height: 110px;
position: absolute;
left: 50%;
top: 50%;
background: url('preloader.png') no-repeat 50% 50%;
margin: -55px 0 0 -55px;
}
@-webkit-keyframes flash {
from, 50%, to {
opacity: 1;
}
25%, 75% {
opacity: 0;
}
}
@keyframes flash {
from, 50%, to {
opacity: 1;
}
25%, 75% {
opacity: 0;
}
}
.flash {
-webkit-animation-name
: flash;
animation-name: flash;
-webkit-animation-duration: 5s;
animation-duration: 5s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
</style>
<!-- Example styles, shoud be deleted -->
<style>
.grid-highlight.row {
margin-bottom: 20px;
}
.grid-highlight.row > div > div {
font-size: 14px;
background: #ccc;
padding: 10px;
display: block;
}
.form-group.has-success {
color: green;
}
.form-group.has-error {
color: red;
}
.form-group.validating {
color: orange;
}
button[disabled],
html input[disabled] {
color: gray;
}
.form-control.readonly {
background-color: gray;
}
.help-block {
margin: 0;
}
.error-text {
padding-top: 20px;
display: block;
}
.collapse {
display: none;
visibility: hidden;
}
.collapse.in {
display: block;
visibility: visible;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition-timing-function: ease;
-o-transition-timing-function: ease;
transition-timing-function: ease;
-webkit-transition-duration: .35s;
-o-transition-duration: .35s;
transition-duration: .35s;
-webkit-transition-property: height, visibility;
-o-transition-property: height, visibility;
transition-property: height, visibility;
}
</style>
</head>
<body>
<!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="page-preloader">
<div class="preloader-itself flash" ></div>
</div>
<div class="container">
<div class="layout-header">
<div class="top-header">
<a href="main.html" class="logo-block">
<img src="images/logo.svg" width="170" height="73" alt="logo">
</a>
<div class="lang-block">
<ul>
<li><a class="active" href="">Укр</a></li>
<li><a href="">Рус</a></li>
<li><a href="">Eng</a></li>
</ul>
</div>
</div>
<div class="bottom-header container">
<div class="menu-icon"></div>
<ul>
<li><a href="collections.html">коллекция</a></li>
<li><a href="exhibitions.html">выставки</a></li>
<li><a href="projects.html">наши проекты</a></li>
<li><a href="">издания</a></li>
<li><a href="">новости</a></li>
<li><a href="">патерны</a></li>
<li><a href="">контакты</a></li>
</ul>
</div>
</div>
</div>
<div class="layout-content">
<div class="layout-container">
<form id="my-form" data-toggle="popel-validator">
<div class="form-group">
<label for="firstname">First name:</label>
<input id="firstname" name="fname" type="text" class="form-control"
data-rules="not-empty min-length max-length"
data-min-length="3"
data-max-length="255">
</div>
<div class="form-group">
<label for="lastname">Last name:</label>
<input id="lastname" name="lname" type="text" class="form-control"
data-rules="not-empty min-length max-length"
data-min-length="3"
data-max-length="255">
</div>
<div class="form-group">
<label for="email">E-mail:</label>
<input id="email" name="email" type="email" class="form-control"
data-rules="not-empty min-length max-length email email-unique"
data-min-length="3"
data-max-length="255">
</div>
<div class="form-group">
<label for="password">Password:</label>
<input id="password" name="pass" type="password" class="form-control"
data-rules="not-empty min-length password"
data-min-length="8">
</div>
<div class="form-group">
<label for="password-confirm">Confirm password:</label>
<input id="password-confirm" name="pass2" type="password" class="form-control"
data-rules="not-empty same-as"
data-same-as="pass">
</div>
<div class="form-group">
<label for="phone">Phone:</label>
<input id="phone" name="phone" type="tel" class="form-control"
data-rules="min-length max-length"
data-min-length="7"
data-max-length="15">
</div>
<button type="submit" class="btn btn-primary disabled" disabled>Submit</button>
</form>
</div>
</div>
<div class="layout-footer">
<div class="footer-menu">
<ul>
<li><a href="">коллекция</a></li>
<li><a href="">выставки</a></li>
<li><a href="">наши проекты</a></li>
<li><a href="">издания</a></li>
<li><a href="">новости</a></li>
<li><a href="">патерны</a></li>
<li><a href="">контакты</a></li>
</ul>
</div>
<div class="social-links-block">
<a href="" class="social-item gold en"><i>V</i><i>k</i><i>o</i><i>n</i><i>t</i><i>a</i><i>k</i><i>t</i><i>e</i></a>
<a href="" class="social-item gold en"><i>F</i><i>a</i><i>c</i><i>e</i><i>b</i><i>o</i><i>o</i><i>k</i></a>
<a href="" class="social-item gold en"><i>I</i><i>n</i><i>s</i><i>t</i><i>a</i><i>g</i><i>r</i><i>a</i><i>m</i></a>
</div>
<div class="main-title wow"><span>КОНТАКТНАЯ ИНФОРМАЦИЯ</span></div>
<div class="footer-contacts">
<div class="contacts">
<div class="phone">Пресс-служба +38 057 731 27 30</div>
<div class="mail">[email protected]</div>
</div>
<div class="copyrights">© Feldmancollection. All Rights Reserved</div>
<div class="madeby">Site made with love by</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- -->
<script>window.jQuery || document.write('<script src="scripts/vendor/jquery-2.1.3.min.js"><\/script>')</script>
<!-- Cached build -->
<script src="scripts/main.min.js"></script>
<!-- /
<!-- -->
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<!-- <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXX-X', 'auto');
ga('send', 'pageview');
</script> -->
<script>(function ($) {
// Redefine some default values
$.fn.popelValidator.defaults.messageTemplate = '<p class="help-block collapse"><span class="message-text"></span></p>';
$.fn.popelValidator.defaults.messageTextSelector = '.message-text';
// Custom async rule example
$.fn.popelValidator.addRule('email-unique', function (value) {
var promise = $.Deferred();
window.setTimeout(function () {
var rand = Math.round(Math.random());
promise[rand === 1 ? 'resolve' : 'reject']();
}, 1000);
return promise;
});
// Custom error messages example
$.fn.popelValidator.setRuleMessage({
email: "Введите корректный e-mail",
'email-unique': "E-mail :value уже занят"
});
// Use collapse to show field errors
$(document).on('controlvalidated.popel.validator', '.form-control', function (event) {
var state = event.state;
if (state === $.fn.popelValidator.Constructor.STATE_INVALID) {
$(this).closest('.form-group').find('.help-block').collapse('show');
}
});
// Remove field errors after collapse hide animation finishes
$(document).on('resetcontrolmessage.popel.validator', '.form-control', function (event) {
event.preventDefault();
var $message = $(event.relatedTarget);
$message.collapse('hide').one('hidden.bs.collapse', function () {
$message.remove();
});
});
})(window.jQuery);</script>
</body>
</html>