forked from cojitza/TWBootstrapJQValPopover
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
76 lines (66 loc) · 3.52 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Popover Error Messages</title>
<link href="resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container">
<div class="row">
<div class="span8 offset2">
<h1>Popover Error Messages<br ><small>with JQuery Validation and Twitter Bootstrap</small></h1>
<form>
<fieldset>
<legend>Test fields</legend>
<div class="row">
<div class="span4 control-group">
<label for="textbox">Enter Some Text</label>
<div class="controls">
<input type="text" name="textbox" id="textbox" class="span4" title="Error Title"
data-rule-required="true"
data-placement="bottom" />
<ul class="help-block">
<li>This field is reqired.</li>
<li>The Popover will appear below ('data-placement' attribute) the text box.</li>
<li>The title is specified within the 'title' attribute.</li>
</ul>
</div>
</div>
<div class="span4 control-group">
<label for="numbers">Enter Some Numbers (1-10)</label>
<div class="controls">
<input type="text" name="numbers" id="numbers" class="span4"
data-rule-range="[1, 10]"
data-rule-required="true"
data-title="Number Error"/>
<ul class="help-block">
<li>This field is reqired.</li>
<li>Only numbers between 1 and 10 are allowed.</li>
<li>The Popover will appear to the right (default) of the text box.</li>
<li>The title is specified within the 'data-title' attribute.</li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="span8 form-actions">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="resources/js/bootstrap.min.js"></script>
<script src="resources/js/jquery.validate.js"></script>
<script src="resources/js/jquery.validate.bootstrap.js"></script>
<script>
$(document).ready(function() {
$('form').validate();
});
</script>
</body>
</html>