mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +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,
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user