-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
33 lines (32 loc) · 856 Bytes
/
test.html
File metadata and controls
33 lines (32 loc) · 856 Bytes
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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<script src="jquery.js"></script>
<script src="validation.js"></script>
<title></title>
</head>
<body>
<form id="form-for-validate">
<div class="input-container">
<input type="text" value="" id="req">
<cite>
<ul class="errorList"><li>Ошибка</li></ul>
</cite>
</div>
<div class="input-container">
<input type="text" value="" id="num">
</div>
<input type="button" id="submitButton" value="Submit">
</form>
<script>
var r1 = new MC.Common.Validator.SimpleItem($('#req'), MC.Common.Validator.Rules.required);
var vf = new MC.Common.Validator.ValidatorForm([r1], {
dialogSelector: '#form-for-validate',
errorLine: '.input-container',
errorListClass: 'error',
$buttonSubmit: $('#submitButton')
});
</script>
</body>
</html>