mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix eventLocationName validator and remove eventLocationName of query parameters if eventIsOnline true.
This commit is contained in:
parent
387fa9bfcb
commit
ae2aec0d8a
@ -304,6 +304,7 @@ export default {
|
|||||||
min: 3,
|
min: 3,
|
||||||
max: 100,
|
max: 100,
|
||||||
validator: (_, value = '') => {
|
validator: (_, value = '') => {
|
||||||
|
if (this.formData.eventIsOnline) return []
|
||||||
if (!value.trim()) {
|
if (!value.trim()) {
|
||||||
return [new Error(this.$t('common.validations.eventLocationNameNotEmpty'))]
|
return [new Error(this.$t('common.validations.eventLocationNameNotEmpty'))]
|
||||||
}
|
}
|
||||||
@ -322,7 +323,7 @@ export default {
|
|||||||
eventVenue: this.formData.eventVenue,
|
eventVenue: this.formData.eventVenue,
|
||||||
eventEnd: this.formData.eventEnd,
|
eventEnd: this.formData.eventEnd,
|
||||||
eventIsOnline: this.formData.eventIsOnline,
|
eventIsOnline: this.formData.eventIsOnline,
|
||||||
eventLocationName: this.formData.eventLocationName,
|
eventLocationName: !this.formData.eventIsOnline ? this.formData.eventLocationName : null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user