forked from victorjonsson/jQuery-Form-Validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toggle-disabled.html
59 lines (49 loc) · 1.58 KB
/
toggle-disabled.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Toggle Disabled Module</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css">
</head>
<body>
<div>
<form action="" style="margin: 3% auto; max-width: 400px" role="form">
<div class="form-group">
<label class="control-label">E-mail</label>
<input class="form-control" name="email" type="email" data-validation="email" />
</div>
<div class="form-group">
<label class="control-label">Password</label>
<input class="form-control" name="password" type="password"
data-validation="length"
data-validation-length="min5"
data-validation-error-msg="You have not given a correct password" />
</div>
<div class="form-group">
<label class="control-label">Service</label>
<select class="form-control" data-validation="required">
<option value="">- - Choose service - -</option>
<option>Admin</option>
<option>Client</option>
<option>Public</option>
</select>
</div>
<div class="form-group">
<button type="submit">Login</button>
<button type="reset">Reset</button>
</div>
</form>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="../form-validator/jquery.form-validator.min.js"></script>
<script>
$.validate({
modules: 'security, toggleDisabled',
onSuccess: function() {
alert('valid');
return false;
}
});
</script>
</body>
</html>