Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: updates form validation scheme for street, number and city #6122

Merged
merged 4 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ValidationProvider>
</div>
<ValidationProvider
rules="required|min:5"
rules="required"
v-slot="{ errors }"
class="form__element"
>
Expand All @@ -49,16 +49,22 @@
:errorMessage="errors[0]"
/>
</ValidationProvider>
<SfInput
v-model="form.apartment"
name="apartment"
label="House/Apartment number"
required
<ValidationProvider
rules="required"
v-slot="{ errors }"
class="form__element"
/>
>
<SfInput
v-model="form.apartment"
name="apartment"
label="House/Apartment number"
required
class="form__element"
/>
</ValidationProvider>
<div class="form__horizontal">
<ValidationProvider
rules="required|min:2"
rules="required"
v-slot="{ errors }"
class="form__element"
>
Expand Down Expand Up @@ -99,7 +105,7 @@
</div>
<div class="form__horizontal">
<ValidationProvider
rules="required|min:4"
rules="required|min:2"
v-slot="{ errors }"
class="form__element"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ValidationProvider>
</div>
<ValidationProvider
rules="required|min:5"
rules="required"
v-slot="{ errors }"
class="form__element"
>
Expand All @@ -49,16 +49,22 @@
:errorMessage="errors[0]"
/>
</ValidationProvider>
<SfInput
v-model="form.apartment"
name="apartment"
label="House/Apartment number"
required
<ValidationProvider
rules="required"
v-slot="{ errors }"
class="form__element"
/>
>
<SfInput
v-model="form.apartment"
name="apartment"
label="House/Apartment number"
required
class="form__element"
/>
</ValidationProvider>
<div class="form__horizontal">
<ValidationProvider
rules="required|min:2"
rules="required"
v-slot="{ errors }"
class="form__element"
>
Expand Down Expand Up @@ -99,7 +105,7 @@
</div>
<div class="form__horizontal">
<ValidationProvider
rules="required|min:4"
rules="required|min:2"
v-slot="{ errors }"
class="form__element"
>
Expand Down
6 changes: 3 additions & 3 deletions packages/commercetools/theme/pages/Checkout/Billing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</ValidationProvider>
<ValidationProvider
name="streetName"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -82,7 +82,7 @@
</ValidationProvider>
<ValidationProvider
name="apartment"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -100,7 +100,7 @@
</ValidationProvider>
<ValidationProvider
name="city"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand Down
6 changes: 3 additions & 3 deletions packages/commercetools/theme/pages/Checkout/Shipping.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</ValidationProvider>
<ValidationProvider
name="streetName"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -75,7 +75,7 @@
</ValidationProvider>
<ValidationProvider
name="apartment"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -93,7 +93,7 @@
</ValidationProvider>
<ValidationProvider
name="city"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand Down
8 changes: 8 additions & 0 deletions packages/core/docs/changelog/6122.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
description: 'Updates form validation scheme for street, number and city in the checkout and profile editing pages',
link: 'https://github.com/vuestorefront/vue-storefront/pull/6122',
isBreaking: false,
breakingChanges: [],
author: 'Heitor Ramon Ribeiro',
linkToGitHubAccount: 'https://github.com/bloodf'
};
8 changes: 8 additions & 0 deletions packages/core/docs/commercetools/changelog/6122.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
description: 'Updates form validation scheme for street, number and city in the checkout and profile editing pages',
link: 'https://github.com/vuestorefront/vue-storefront/pull/6122',
isBreaking: false,
breakingChanges: [],
author: 'Heitor Ramon Ribeiro',
linkToGitHubAccount: 'https://github.com/bloodf'
};
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</ValidationProvider>
<ValidationProvider
name="streetName"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -61,7 +61,7 @@
</ValidationProvider>
<ValidationProvider
name="apartment"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -78,7 +78,7 @@
</ValidationProvider>
<ValidationProvider
name="city"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</ValidationProvider>
<ValidationProvider
name="streetName"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -61,7 +61,7 @@
</ValidationProvider>
<ValidationProvider
name="apartment"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand All @@ -78,7 +78,7 @@
</ValidationProvider>
<ValidationProvider
name="city"
rules="required|min:2"
rules="required"
v-slot="{ errors }"
slim
>
Expand Down