From 5b2b660584d0b93b156bc5fd9927d4116f2deb08 Mon Sep 17 00:00:00 2001 From: Sebin Song Date: Tue, 10 Dec 2024 01:51:58 +0900 Subject: [PATCH] fix the max-err not showing (#2420) --- .../containers/group-settings/GroupCreationModal.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/views/containers/group-settings/GroupCreationModal.vue b/frontend/views/containers/group-settings/GroupCreationModal.vue index baddb20d69..5d8528202e 100644 --- a/frontend/views/containers/group-settings/GroupCreationModal.vue +++ b/frontend/views/containers/group-settings/GroupCreationModal.vue @@ -56,7 +56,8 @@ import proposals from '@model/contracts/shared/voting/proposals.js' import { PROPOSAL_GENERIC, GROUP_NAME_MAX_CHAR, - GROUP_DESCRIPTION_MAX_CHAR + GROUP_DESCRIPTION_MAX_CHAR, + GROUP_MINCOME_MAX } from '@model/contracts/shared/constants.js' import currencies, { mincomePositive, normalizeCurrency } from '@model/contracts/shared/currencies.js' import { L } from '@common/common.js' @@ -75,7 +76,7 @@ import { // we use require instead of import with this file to make rollup happy // or not... using require only makes rollup happy during compilation // but then the browser complains about "require is not defined" -import { required, between, maxLength } from 'vuelidate/lib/validators' +import { required, between, maxLength, maxValue } from 'vuelidate/lib/validators' export default ({ name: 'GroupCreationModal', @@ -188,7 +189,8 @@ export default ({ [L('The amount must be a number. (E.g. 100.75)')]: function (value) { return currencies[this.form.mincomeCurrency].validate(value) }, - [L('Mincome must be greater than 0')]: mincomePositive + [L('Mincome must be greater than 0')]: mincomePositive, + [L('Mincome cannot exceed {max}', { max: GROUP_MINCOME_MAX })]: maxValue(GROUP_MINCOME_MAX) }, mincomeCurrency: { required