/
minimal.htm
75 lines (58 loc) · 1.14 KB
/
minimal.htm
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
<!DOCTYPE html>
<script src="../js/jquery-1.5.min.js"></script>
<script src="../../src/validator/validator.js"></script>
<style>
label {
margin:10px 0;
display:block;
}
body {
padding:100px;
font-family:sans-serif;
}
.invalid {
border:1px solid red;
}
.error {
border:1px solid #667;
background:#eee;
padding:5px;
}
</style>
<form action="#">
<label>
requred text
<input type="text" required="required" />
</label>
<label>
pattern
<input type="text" pattern="\d+" />
</label>
<label>
URL
<input type="url" value="http://www.spa.gov.sa/NewsHeadlines.php?pg=2&joku+paha" />
</label>
<label>
date
<input type="date" title="Use format yyyy-mm-dd" name="day" />
</label>
<label>
email
<input type="email" />
</label>
<label>
terms
<input type="checkbox" required="required" name="terms" data-message="Accept the terms" />
</label>
<label>
required
<select required="required">
<option value="">-- choose one --</option>
<option value="8">jotain</option>
</select>
</label>
<!-- <button>Submit</button> -->
</form>
<script>
$("form").validator({ position: 'top center'});
</script>