Skip to content

Commit 20c2fbc

Browse files
committed
impr: school email detection regex
!nuf
1 parent e55cd7b commit 20c2fbc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/ts/pages/login.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const checkEmail = (): void => {
8181
const email = $(".page.pageLogin .register.side .emailInput").val() as string;
8282
const emailRegex =
8383
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
84-
const educationRegex = /@.*(education|\.edu$|\.edu\.|\.ac\.|\.sch\.)/i;
84+
const educationRegex = /@.*(education|school|\.edu$|\.edu\.|\.ac\.|\.sch\.)/i;
8585

8686
const emailHasTypo = TypoList.some((typo) => {
8787
return email.endsWith(typo);
@@ -96,7 +96,7 @@ const checkEmail = (): void => {
9696
} else if (educationRegex.test(email)) {
9797
emailIndicator.show(
9898
"edu",
99-
"Some education emails will fail to receive our messages. Consider using a personal email address."
99+
"Some education emails will fail to receive our messages, or disable the account as soon as you graduate. Consider using a personal email address."
100100
);
101101
} else {
102102
emailIndicator.show("valid");

0 commit comments

Comments
 (0)