diff --git a/webapp/components/ContributionForm/#ContributionForm.vue# b/webapp/components/ContributionForm/#ContributionForm.vue# new file mode 100644 index 000000000..1d1353b1e --- /dev/null +++ b/webapp/components/ContributionForm/#ContributionForm.vue# @@ -0,0 +1,623 @@ + + + + diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index c305b1fed..47841c717 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -286,30 +286,39 @@ export default { }, }, eventStart: { required: !!this.createEvent }, - eventVenue: { + eventVenue: { required: !!this.createEvent, min: 3, max: 100, validator: (_, value = '') => { + if (!this.createEvent) return [] if (!value.trim()) { return [new Error(this.$t('common.validations.eventVenueNotEmpty'))] } if (value.length < 3 || value.length > 100) { - return [new Error(this.$t('common.validations.eventVenueLength', { min: 3, max: 100 }))] + return [ + new Error(this.$t('common.validations.eventVenueLength', { min: 3, max: 100 })), + ] } return [] - }, }, + }, + }, eventLocationName: { required: !!this.createEvent && !this.formData.eventIsOnline, min: 3, max: 100, validator: (_, value = '') => { + if (!this.createEvent) return [] if (this.formData.eventIsOnline) return [] if (!value.trim()) { return [new Error(this.$t('common.validations.eventLocationNameNotEmpty'))] } if (value.length < 3 || value.length > 100) { - return [new Error(this.$t('common.validations.eventLocationNameLength', { min: 3, max: 100 }))] + return [ + new Error( + this.$t('common.validations.eventLocationNameLength', { min: 3, max: 100 }), + ), + ] } return [] },