File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 35
35
</ code >
36
36
37
37
< h2 > Example of all features</ h2 >
38
- < section >
38
+ < div class =" section " >
39
39
< form action ="" onsubmit ="if($(this).validate()) alert('Valid!'); return false; ">
40
40
< p >
41
41
< strong > Required</ strong > < em > required</ em > < br />
@@ -125,11 +125,19 @@ <h2>Example of all features</h2>
125
125
</ p >
126
126
127
127
< p >
128
- < strong > These two inputs has to have identical values (minimum 3 characters)</ strong > < em > validate_confirmation</ em > < br />
128
+ < strong > These two inputs has to have identical values (minimum 3 characters)</ strong > < em > validate_confirmation length3 </ em > < br />
129
129
< input name ="something " data-validation ="validate_confirmation validate_min_length length3 "/>
130
130
< input name ="something_confirmation "/>
131
131
</ p >
132
-
132
+ < p >
133
+ < strong > These features applies to select lists as well</ strong >
134
+ < select name ="whatever " data-validation ="required ">
135
+ < option value =""> - - Select something - -</ option >
136
+ < option value ="1 "> Green</ option >
137
+ < option value ="2 "> Blue</ option >
138
+ < option value ="red "> Red</ option >
139
+ </ select >
140
+ </ p >
133
141
< p >
134
142
< strong > Length restriction</ strong >
135
143
< span class ="chars_left ">
@@ -145,12 +153,12 @@ <h2>Example of all features</h2>
145
153
< input type ="submit " value ="Validate form "/>
146
154
</ p >
147
155
</ form >
148
- </ section >
156
+ </ div class=" section" >
149
157
150
158
< h2 >
151
159
Customized example (no border color on error, different position on error messages)
152
160
</ h2 >
153
- < section >
161
+ < div class =" section " >
154
162
< form action ="" id ="custom_form ">
155
163
< p >
156
164
< strong > Length between 3-5 characters</ strong > < em > validate_length length3-5</ em > < br />
205
213
206
214
</ script >
207
215
208
- </ section >
216
+ </ div class=" section" >
209
217
</ body >
210
218
</ html >
Original file line number Diff line number Diff line change 289
289
//
290
290
// Reset style and remove error class
291
291
//
292
- $ ( this ) . find ( 'input,textarea' )
292
+ $ ( this ) . find ( 'input,textarea,select ' )
293
293
. css ( 'border-color' , jQueryFormUtils . defaultBorderColor )
294
294
. removeClass ( config . errorElementClass ) ;
295
295
Original file line number Diff line number Diff line change 21
21
margin-bottom : 20px ;
22
22
}
23
23
24
- section , code , h2 {
24
+ div . section , code , h2 {
25
25
-moz-border-radius : 12px ;
26
26
-webkit-border-radius : 12px ;
27
27
background : # FFF ;
You can’t perform that action at this time.
0 commit comments