File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
app/code/Magento/Checkout/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,13 @@ define([
122
122
123
123
this . options . form = $ ( this . options . form ) ;
124
124
125
- this . options . form && this . options . form . data ( 'validation ' ) && this . options . form . validation ( 'clearError' ,
125
+ this . options . form && this . options . form . data ( 'validator ' ) && this . options . form . validation ( 'clearError' ,
126
126
this . options . regionListId , this . options . regionInputId , this . options . postcodeId ) ;
127
+
128
+ // Clean up errors on region & zip fix
129
+ $ ( this . options . regionInputId ) . removeClass ( 'mage-error' ) . parent ( ) . find ( '[generated]' ) . remove ( ) ;
130
+ $ ( this . options . regionListId ) . removeClass ( 'mage-error' ) . parent ( ) . find ( '[generated]' ) . remove ( ) ;
131
+ $ ( this . options . postcodeId ) . removeClass ( 'mage-error' ) . parent ( ) . find ( '[generated]' ) . remove ( ) ;
127
132
}
128
133
} ,
129
134
/**
@@ -182,11 +187,12 @@ define([
182
187
if ( ! this . options . optionalRegionAllowed ) {
183
188
regionInput . attr ( 'disabled' , 'disabled' ) ;
184
189
}
190
+ requiredLabel . removeClass ( 'required' ) ;
191
+ regionInput . removeClass ( 'required-entry' )
185
192
}
186
193
187
194
regionList . removeClass ( 'required-entry' ) . hide ( ) ;
188
195
regionInput . show ( ) ;
189
- requiredLabel . removeClass ( 'required' ) ;
190
196
label . attr ( 'for' , regionInput . attr ( 'id' ) ) ;
191
197
}
192
198
You can’t perform that action at this time.
0 commit comments