Skip to content

Commit e5cb5fc

Browse files
committed
decrease the limit for password length
Closes #918
1 parent 0419ca3 commit e5cb5fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/utils/user-validation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ export const UsernameSchema = z
1616
export const PasswordSchema = z
1717
.string({ required_error: 'Password is required' })
1818
.min(6, { message: 'Password is too short' })
19-
.max(100, { message: 'Password is too long' })
19+
// NOTE: bcrypt has a limit of 72 characters (which should be plenty long)
20+
// https://github.com/epicweb-dev/epic-stack/issues/918
21+
.max(72, { message: 'Password is too long' })
22+
2023
export const NameSchema = z
2124
.string({ required_error: 'Name is required' })
2225
.min(3, { message: 'Name is too short' })
2326
.max(40, { message: 'Name is too long' })
27+
2428
export const EmailSchema = z
2529
.string({ required_error: 'Email is required' })
2630
.email({ message: 'Email is invalid' })

0 commit comments

Comments
 (0)