change validation
This commit is contained in:
@@ -109,11 +109,6 @@ export async function registration(
|
||||
}
|
||||
});
|
||||
|
||||
console.log('response <======');
|
||||
console.log(response);
|
||||
console.log('process.env.SESSION_SECRET <======');
|
||||
console.log(process.env?.SESSION_SECRET);
|
||||
|
||||
if (response.ok) {
|
||||
console.log('enter response ok <======');
|
||||
let parsed = await response.json();
|
||||
|
||||
@@ -25,7 +25,7 @@ export const SignupFormSchema = z
|
||||
email: z.email({ error: 'Please enter a valid email.' }).trim(),
|
||||
password: z
|
||||
.string()
|
||||
.min(6, { error: 'Be at least 6 characters long' })
|
||||
.min(8, { error: 'Be at least 8 characters long' })
|
||||
.regex(/[a-zA-Z]/, { error: 'Contain at least one letter.' })
|
||||
.regex(/[0-9]/, { error: 'Contain at least one number.' })
|
||||
.trim(),
|
||||
|
||||
Reference in New Issue
Block a user