Skip to content

Commit

Permalink
#68 - fixes for shipping step validation
Browse files Browse the repository at this point in the history
  • Loading branch information
szafran89 committed Dec 19, 2018
1 parent 57e06ec commit 3de1e2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions view/frontend/web/js/components/steps/TheShippingStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,20 @@ export default {
this.$store.dispatch('updateShippingMethods', this.address.country_id.value)
},
goToNextStep () {
// show erorrs for customer email field, shipping address form and shipping methods radio buttons
this.$refs.customerEmail.touch()
// show erorrs for customer email field
if (!this.isCustomerLoggedIn) {
this.$refs.customerEmail.touch()
}
// show errors for shipping address form and shipping methods radio buttons
this.$refs.shippingsMethods.touch()
this.$v.$touch()
// check if sth from above is wrong
if (
this.$v.$invalid ||
!this.shippingMethodsReadyToSubmit ||
!this.customerEmailReadyToSubmit
(!this.isCustomerLoggedIn && !this.customerEmailReadyToSubmit)
) {
return
}
Expand Down

0 comments on commit 3de1e2f

Please sign in to comment.