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