Skip to content

Commit

Permalink
fix: fixed the regex code for sjec students
Browse files Browse the repository at this point in the history
  • Loading branch information
joywin2003 committed Nov 30, 2024
1 parent 4958d78 commit 7cf89c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/auth-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const authOptions: NextAuthOptions = {
const emailPrefix = profile.email.split("@")[0];

// Define BE and MBA patterns
const isBEEmail = /^[2][1-4]\d{3}\..+$/; // Matches 21XXXX, 22XXXX, 23XXXX, 24XXXX for BE
const isBEEmail = /^[2][1-4][a-z]?\d{2}\..+$/;
const isMBAEmail = /^[2][3-4]ba\d{3}\..+$/; // Matches 23baXXX, 24baXXX for MBA
const isMCAEmail = /^[2][3-4]ca\d{3}\..+$/; // Matches 23maXXX, 24maXXX for MCA

Expand Down

0 comments on commit 7cf89c6

Please sign in to comment.