This repository was archived by the owner on Oct 21, 2022. It is now read-only.
File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ <h2>Required</h2>
25
25
< label > Minlength (3): < input type ="text " required data-validate ="length " minlength ="3 "> </ label >
26
26
< label > Maxlength (3): < input type ="text " required data-validate ="length " maxlength ="3 "> </ label >
27
27
< label > Both Min (3) and Maxlength (5): < input type ="text " required data-validate ="length " minlength ="3 " maxlength ="5 "> </ label >
28
+ < label > Select one Radio:
29
+ < input type ="radio " required name ="my-radio-3 ">
30
+ < input type ="radio " required name ="my-radio-3 ">
31
+ </ label >
32
+ < label > Select one Checkbox:
33
+ < input type ="checkbox " required name ="my-checkbox-3 ">
34
+ < input type ="checkbox " required name ="my-checkbox-3 ">
35
+ </ label >
28
36
< label > Checkbox Length:
29
37
< input type ="checkbox " required name ="my-checkbox-2 " data-validate ="length " minlength ="2 ">
30
38
< input type ="checkbox " required name ="my-checkbox-2 " data-validate ="length " minlength ="2 ">
Original file line number Diff line number Diff line change 74
74
$selected = null ;
75
75
}
76
76
} else if ( this . _isCheckboxRadio ( ) ) {
77
- $els = this . $element . closest ( "form, body" ) . find ( '[name="' + this . $element . attr ( 'name' ) + '"]:checked' ) ;
77
+ $els = this . $element . closest ( "form, body" ) . find ( '[name="' + this . $element . attr ( 'name' ) + '"]' ) . filter ( function ( ) {
78
+ return this . checked ;
79
+ } ) ;
78
80
}
79
81
80
82
if ( $options && $options . length ) {
88
90
arr . push ( this . value ) ;
89
91
}
90
92
} ) ;
91
- return $ ( arr ) . get ( ) ;
93
+ return arr ;
92
94
}
93
95
94
96
return this . element . value ;
You can’t perform that action at this time.
0 commit comments