enhance: limit password length #703

This commit is contained in:
Jacky 2024-11-15 17:07:19 +08:00
parent 147b35b445
commit ff7938b90c
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
2 changed files with 6 additions and 0 deletions

View file

@ -37,12 +37,14 @@ function handleGenerate() {
v-model:value="modelValue"
:class="{ compact: generate }"
:placeholoder="placeholder"
:maxlength="20"
/>
<AInput
v-else
v-model:value="modelValue"
:class="{ compact: generate }"
:placeholoder="placeholder"
:maxlength="20"
/>
<AButton
v-if="generate"

View file

@ -43,6 +43,10 @@ const rulesRef = reactive({
required: true,
message: () => $gettext('Please input your password!'),
},
{
max: 20,
message: () => $gettext('Password length cannot exceed 20 characters'),
},
],
database: [
{