This commit is contained in:
ogerly 2022-09-09 13:06:46 +02:00
parent a1da04ec05
commit 80940ae4f5
2 changed files with 5 additions and 2 deletions

View File

@ -111,7 +111,10 @@ export default {
type: 'array',
required: this.categoriesActive,
validator: (_, value = []) => {
if (this.categoriesActive && (value.length < CATEGORIES_MIN || value.length > CATEGORIES_MAX)) {
if (
this.categoriesActive &&
(value.length < CATEGORIES_MIN || value.length > CATEGORIES_MAX)
) {
return [new Error(this.$t('common.validations.categories'))]
}
return []