From ae2aec0d8a193a18f3d82c77042f474a0a4fd086 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 7 Jun 2023 16:43:38 +0200 Subject: [PATCH] Fix eventLocationName validator and remove eventLocationName of query parameters if eventIsOnline true. --- webapp/components/ContributionForm/ContributionForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index ae1a7654b..c305b1fed 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -304,6 +304,7 @@ export default { min: 3, max: 100, validator: (_, value = '') => { + if (this.formData.eventIsOnline) return [] if (!value.trim()) { return [new Error(this.$t('common.validations.eventLocationNameNotEmpty'))] } @@ -322,7 +323,7 @@ export default { eventVenue: this.formData.eventVenue, eventEnd: this.formData.eventEnd, eventIsOnline: this.formData.eventIsOnline, - eventLocationName: this.formData.eventLocationName, + eventLocationName: !this.formData.eventIsOnline ? this.formData.eventLocationName : null, } } return undefined