File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
app/code/Magento/Checkout/view/frontend/web/js/view Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ define(
179
179
newShippingAddress ;
180
180
181
181
this . source . set ( 'params.invalid' , false ) ;
182
- this . source . trigger ( 'shippingAddress.data.validate' ) ;
182
+ this . triggerShippingDataValidateEvent ( ) ;
183
183
184
184
if ( ! this . source . get ( 'params.invalid' ) ) {
185
185
addressData = this . source . get ( 'shippingAddress' ) ;
@@ -254,12 +254,7 @@ define(
254
254
255
255
if ( this . isFormInline ) {
256
256
this . source . set ( 'params.invalid' , false ) ;
257
- this . source . trigger ( 'shippingAddress.data.validate' ) ;
258
-
259
- if ( this . source . get ( 'shippingAddress.custom_attributes' ) ) {
260
- this . source . trigger ( 'shippingAddress.custom_attributes.data.validate' ) ;
261
- }
262
-
257
+ this . triggerShippingDataValidateEvent ( ) ;
263
258
if ( emailValidationResult &&
264
259
this . source . get ( 'params.invalid' ) ||
265
260
! quote . shippingMethod ( ) . method_code ||
@@ -304,6 +299,18 @@ define(
304
299
}
305
300
306
301
return true ;
302
+ } ,
303
+
304
+ /**
305
+ * Trigger Shipping data Validate Event.
306
+ *
307
+ * @return {void }
308
+ */
309
+ triggerShippingDataValidateEvent : function ( ) {
310
+ this . source . trigger ( 'shippingAddress.data.validate' ) ;
311
+ if ( this . source . get ( 'shippingAddress.custom_attributes' ) ) {
312
+ this . source . trigger ( 'shippingAddress.custom_attributes.data.validate' ) ;
313
+ }
307
314
}
308
315
} ) ;
309
316
}
You can’t perform that action at this time.
0 commit comments