File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 296296 applyInputErrorStyling : function ( $input , conf ) {
297297 $input
298298 . addClass ( conf . errorElementClass )
299- . removeClass ( 'valid' ) ;
299+ . removeClass ( conf . successElementClass ) ;
300300
301301 this . getParentContainer ( $input )
302302 . addClass ( conf . inputParentClassOnError )
315315
316316 // Reset input css
317317 $input
318- . removeClass ( 'valid' )
318+ . removeClass ( conf . successElementClass )
319319 . removeClass ( conf . errorElementClass )
320320 . css ( 'border-color' , '' ) ;
321321
352352 }
353353
354354 // Remove input css/messages
355- $form . find ( '.' + conf . errorElementClass + ',.valid' ) . each ( function ( ) {
355+ $form . find ( '.' + conf . errorElementClass + ',.' + conf . successElementClass ) . each ( function ( ) {
356356 dialogs . removeInputStylingAndMessage ( $ ( this ) , conf ) ;
357357 } ) ;
358358 } ,
Original file line number Diff line number Diff line change 4444 applyInputErrorStyling : function ( $input , conf ) {
4545 $input
4646 . addClass ( conf . errorElementClass )
47- . removeClass ( 'valid' ) ;
47+ . removeClass ( conf . successElementClass ) ;
4848
4949 this . getParentContainer ( $input )
5050 . addClass ( conf . inputParentClassOnError )
6363
6464 // Reset input css
6565 $input
66- . removeClass ( 'valid' )
66+ . removeClass ( conf . successElementClass )
6767 . removeClass ( conf . errorElementClass )
6868 . css ( 'border-color' , '' ) ;
6969
100100 }
101101
102102 // Remove input css/messages
103- $form . find ( '.' + conf . errorElementClass + ',.valid' ) . each ( function ( ) {
103+ $form . find ( '.' + conf . errorElementClass + ',.' + conf . successElementClass ) . each ( function ( ) {
104104 dialogs . removeInputStylingAndMessage ( $ ( this ) , conf ) ;
105105 } ) ;
106106 } ,
Original file line number Diff line number Diff line change 1818 return {
1919 ignore : [ ] , // Names of inputs not to be validated even though `validationRuleAttribute` containing the validation rules tells us to
2020 errorElementClass : 'error' , // Class that will be put on elements which value is invalid
21+ successElementClass : 'valid' , // Class that will be put on elements that has been validated with success
2122 borderColorOnError : '#b94a48' , // Border color of elements which value is invalid, empty string to not change border color
2223 errorMessageClass : 'form-error' , // class name of div containing error messages when validation fails
2324 validationRuleAttribute : 'data-validation' , // name of the attribute holding the validation rules
You can’t perform that action at this time.
0 commit comments