-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathb_form_validation.php
88 lines (88 loc) · 4.81 KB
/
b_form_validation.php
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
<div class="row-fluid">
<!-- block -->
<div class="block">
<div class="navbar navbar-inner block-header">
<div class="muted pull-left">Form Validation</div>
</div>
<div class="block-content collapse in">
<div class="span12">
<!-- BEGIN FORM-->
<form action="#" id="form_sample_1" class="form-horizontal">
<fieldset>
<div class="alert alert-error hide">
<button class="close" data-dismiss="alert"></button>
You have some form errors. Please check below.
</div>
<div class="alert alert-success hide">
<button class="close" data-dismiss="alert"></button>
Your form validation is successful!
</div>
<div class="control-group">
<label class="control-label">Name<span class="required">*</span></label>
<div class="controls">
<input type="text" name="name" data-required="1" class="span6 m-wrap"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Email<span class="required">*</span></label>
<div class="controls">
<input name="email" type="text" class="span6 m-wrap"/>
</div>
</div>
<div class="control-group">
<label class="control-label">URL<span class="required">*</span></label>
<div class="controls">
<input name="url" type="text" class="span6 m-wrap"/>
<span class="help-block">e.g: http://www.demo.com or http://demo.com</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Number<span class="required">*</span></label>
<div class="controls">
<input name="number" type="text" class="span6 m-wrap"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Digits<span class="required">*</span></label>
<div class="controls">
<input name="digits" type="text" class="span6 m-wrap"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Credit Card<span class="required">*</span></label>
<div class="controls">
<input name="creditcard" type="text" class="span6 m-wrap"/>
<span class="help-block">e.g: 5500 0000 0000 0004</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Occupation </label>
<div class="controls">
<input name="occupation" type="text" class="span6 m-wrap"/>
<span class="help-block">optional field</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Category<span class="required">*</span></label>
<div class="controls">
<select class="span6 m-wrap" name="category">
<option value="">Select...</option>
<option value="Category 1">Category 1</option>
<option value="Category 2">Category 2</option>
<option value="Category 3">Category 5</option>
<option value="Category 4">Category 4</option>
</select>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Validate</button>
<button type="button" class="btn">Cancel</button>
</div>
</fieldset>
</form>
<!-- END FORM-->
</div>
</div>
</div>
<!-- /block -->
</div>