mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
* feat: limit sign-in password length to 72 * limit password length on signup * Update apps/studio/lib/schemas.ts Co-authored-by: Joshen Lim <joshenlimek@gmail.com> * Update apps/studio/components/interfaces/SignIn/SignInForm.tsx Co-authored-by: Joshen Lim <joshenlimek@gmail.com> * don't limit password length on sign in --------- Co-authored-by: Alaister Young <a@alaisteryoung.com> Co-authored-by: Alaister Young <alaister@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
15 lines
309 B
TypeScript
15 lines
309 B
TypeScript
import * as yup from 'yup'
|
|
import YupPassword from 'yup-password'
|
|
|
|
// extend yup with password validation
|
|
YupPassword(yup)
|
|
|
|
export const passwordSchema = yup.object({
|
|
password: yup
|
|
.string()
|
|
.password()
|
|
.required()
|
|
.max(72, 'Password cannot exceed 72 characters')
|
|
.label('Password'),
|
|
})
|