From 644083a086b0f146d352bd5c61eca11a1deaa9dc Mon Sep 17 00:00:00 2001 From: William Chong Date: Wed, 11 Dec 2024 00:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Add=20min=20description=20length?= =?UTF-8?q?=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/IscnRegisterForm.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index f14bc812..dbab3546 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -163,7 +163,7 @@ v-model="description" :is-textarea="true" :error-message=" - validateField(description, charactersLimit.description, true) + validateField(description, charactersLimit.descriptionMax, true, charactersLimit.descriptionMin) " :placeholder="$t('IscnRegisterForm.placeholder.description')" /> @@ -698,7 +698,8 @@ const walletModule = namespace('wallet') export enum CharactersLimit { name = 100, - description = 1600, + descriptionMax = 1600, + descriptionMin = 10, tagContent = 35, tagNumber = 10, authorName = 100, @@ -1107,7 +1108,8 @@ export default class IscnRegisterForm extends Vue { this.name && this.description && this.name.length <= CharactersLimit.name && - this.description.length <= CharactersLimit.description + this.description.length <= CharactersLimit.descriptionMax && + this.description.length >= CharactersLimit.descriptionMin ) }