fix minimum password length message

This commit is contained in:
Francis Cao 2023-04-18 16:00:33 -07:00
parent 16ece9ad64
commit 0889542f3b
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export default function PasswordEditForm({ onSave, onClose }) {
name="newPassword"
rules={{
required: 'Required',
minLength: { value: 8, message: formatMessage(messages.minPasswordLength) },
minLength: { value: 8, message: formatMessage(messages.minPasswordLength, { n: 8 }) },
}}
>
<PasswordField autoComplete="new-password" />
@ -48,7 +48,7 @@ export default function PasswordEditForm({ onSave, onClose }) {
name="confirmPassword"
rules={{
required: formatMessage(labels.required),
minLength: { value: 8, message: formatMessage(messages.minPasswordLength) },
minLength: { value: 8, message: formatMessage(messages.minPasswordLength, { n: 8 }) },
validate: samePassword,
}}
>

View File

@ -48,7 +48,7 @@ export default function UserEditForm({ userId, data, onSave }) {
<FormInput
name="newPassword"
rules={{
minLength: { value: 8, message: formatMessage(messages.minPasswordLength) },
minLength: { value: 8, message: formatMessage(messages.minPasswordLength, { n: 8 }) },
}}
>
<PasswordField autoComplete="new-password" />