Skip to content

Commit 55cf72f

Browse files
authored
Merge pull request #87 from TEDx-SJEC/regex
fix: fixed the regex code for sjec students
2 parents 4958d78 + 7cf89c6 commit 55cf72f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/auth-options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const authOptions: NextAuthOptions = {
4444
const emailPrefix = profile.email.split("@")[0];
4545

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

0 commit comments

Comments
 (0)