-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix zod,add update details,change pic
- Loading branch information
Showing
12 changed files
with
359 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import z from "zod"; | ||
import { z } from "zod"; | ||
export const registerSchema = z.object({ | ||
email: z.string().email({ message: "Invalid email address " }), | ||
username: z | ||
.string() | ||
.min(3, { message: "Username must be at least 3 characters long " }), | ||
password: z | ||
.string() | ||
.min(6, { message: "Password must be at least 6 characters long. " }) | ||
.regex( | ||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/, | ||
{ | ||
message: | ||
"Password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character ", | ||
} | ||
), | ||
collegeName: z.string().optional(), | ||
courseName: z.string().optional(), | ||
isOnline: z.boolean(), | ||
location: z.string().optional(), | ||
}); | ||
email: z.string().email({ message: "Invalid email address " }), | ||
username: z | ||
.string() | ||
.min(3, { message: "Username must be at least 3 characters long " }), | ||
password: z | ||
.string() | ||
.min(6, { message: "Password must be at least 6 characters long. " }) | ||
.regex( | ||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/, | ||
{ | ||
message: | ||
"Password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character ", | ||
} | ||
), | ||
collegeName: z.string().optional(), | ||
courseName: z.string().optional(), | ||
isOnline: z.boolean(), | ||
location: z.string().optional(), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.