require online location for online only events
This commit is contained in:
@@ -45,6 +45,7 @@ v-row.mb-4
|
||||
:prepend-icon='mdiLink'
|
||||
:hint="$t('event.online_locations_help')"
|
||||
:label="$t('event.online_locations')"
|
||||
:rules="[$validators.required('event.online_locations')]"
|
||||
clearable chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||
:delimiters="[',', ';', '; ']"
|
||||
:items="onlineLocations"
|
||||
|
||||
@@ -4,7 +4,7 @@ export default ({ app }, inject) => {
|
||||
const $t = app.i18n.t.bind(app.i18n)
|
||||
const validators = {
|
||||
required (fieldName) {
|
||||
return value => !!value || $t('validators.required', { fieldName: $t(fieldName) })
|
||||
return v => !(v===undefined || v===null || v.length <= 0) || $t('validators.required', { fieldName: $t(fieldName) })
|
||||
},
|
||||
email: [
|
||||
v => !!v || $t('validators.required', { fieldName: $t('common.email') }),
|
||||
|
||||
Reference in New Issue
Block a user