Skip to content

Commit 1a7fd1e

Browse files
author
Perepecho Georgy
committed
update demo
1 parent f25b461 commit 1a7fd1e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

index.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
.js-validate-error-label {
1717
margin-top: 5px;
1818
}
19+
20+
.form__radio, .form__checkbox {
21+
margin-right: 7px !important;
22+
}
1923
</style>
2024
</head>
2125
<body class="container">
@@ -46,7 +50,11 @@ <h2>Classic validation</h2>
4650
<div class="form-group">
4751
<label><input type="checkbox" class="form__checkbox" data-validate-field="checkbox2" checked>I agree</label>
4852
</div>
49-
53+
<div class="form-group">
54+
<label><input type="radio" name="radio" class="form__radio" data-validate-field="radio">Male</label>
55+
<br>
56+
<label><input type="radio" name="radio" class="form__radio" data-validate-field="radio">Female</label>
57+
</div>
5058
<button class="form__btn btn btn-primary">SUBMIT</button>
5159
</form>
5260
<br>
@@ -81,6 +89,9 @@ <h2>Remote validation with custom messages</h2>
8189
<script>
8290
new window.JustValidate('.js-form', {
8391
rules: {
92+
radio: {
93+
required: true
94+
},
8495
checkbox: {
8596
required: true
8697
},
@@ -146,4 +157,4 @@ <h2>Remote validation with custom messages</h2>
146157
</script>
147158

148159
</body>
149-
</html>
160+
</html>

0 commit comments

Comments
 (0)