forked from pauldotknopf/TwitterBootstrapjQueryValidate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.htm
More file actions
58 lines (55 loc) · 2.66 KB
/
demo.htm
File metadata and controls
58 lines (55 loc) · 2.66 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Twitter Bootstrap Clientside Validation using the jquery.validation.js plugin</title>
<link href="/Content/Css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/Content/Css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="/Content/Scripts/jquery-1.7.2.js" type="text/javascript"></script>
<script src="/Content/Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Content/Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>
<script src="/Content/Scripts/jquery.validate.bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("form").validate();
});
</script>
</head>
<body>
<div class="container">
<div class="page-header">
<h1>
Twitter Bootstrap Clientside Validation <small>using the jquery.validation.js plugin</small></h1>
</div>
<form>
<div class="form-horizontal">
<div class="control-group">
<label for="input1" class="control-label">
Required fields
</label>
<div class="controls">
<input id="input1" name="input1" type="text" value="" data-val="true" data-val-required="This field is required. 'p' tags get the class 'help-block'." />
<p class="field-validation-valid" data-valmsg-for="input1" data-valmsg-replace="true">
</p>
</div>
</div>
</div>
<div class="form-inline">
<div class="control-group">
<label for="input2" class="control-label">
Required field
</label>
<div class="controls">
<input id="input2" name="input2" type="text" value="" data-val="true" data-val-required="This field is required. 'span' tags get the class 'help-inline'." />
<span class="field-validation-valid" data-valmsg-for="input2" data-valmsg-replace="true">
</span>
</div>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" type="submit">
Submit</button>
</div>
</form>
</div>
</body>
</html>