Skip to content

Commit

Permalink
🚸 Add min description length check
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Dec 10, 2024
1 parent 82e6359 commit 644083a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
/>
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
)
}
Expand Down

0 comments on commit 644083a

Please sign in to comment.