Copy change
This commit is contained in:
parent
7bf7ca327f
commit
3b50d1a988
|
@ -4,7 +4,10 @@ export function validatePassword(
|
|||
password: string
|
||||
): { valid: true } | { valid: false; error: string } {
|
||||
if (!password || password.length < MIN_LENGTH) {
|
||||
return { valid: false, error: "Password invalid. Minimum eight characters" }
|
||||
return {
|
||||
valid: false,
|
||||
error: "Password invalid. Minimum eight characters.",
|
||||
}
|
||||
}
|
||||
|
||||
return { valid: true }
|
||||
|
|
|
@ -13,7 +13,7 @@ describe("auth", () => {
|
|||
])("%s returns unsuccessful", (_, password) => {
|
||||
expect(validatePassword(password as string)).toEqual({
|
||||
valid: false,
|
||||
error: "Password invalid. Minimum eight characters",
|
||||
error: "Password invalid. Minimum eight characters.",
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue