Skip to content

Commit aa783c7

Browse files
committed
update validataion regex for linkedin and github to support http
1 parent 39e13a6 commit aa783c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clientv2/src/pages/student/StudentProfile.page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function StudentHomePage() {
103103
}
104104

105105
function isValidLinkedInProfile(url?: string) {
106-
const linkedinProfilePattern = /^http(s)?:\/\/(www\.)?linkedin\.com\/in\/[a-zA-Z0-9-]+\/?$/;
106+
const linkedinProfilePattern = /^https?:\/\/(www\.)?linkedin\.com\/in\/[a-zA-Z0-9-]+\/?$/;
107107
if (!url || url === '') {
108108
return true;
109109
}
@@ -121,7 +121,7 @@ export function StudentHomePage() {
121121
}
122122

123123
function isValidGithubProfile(url?: string) {
124-
const githubProfilePattern = /^http(s)?:\/\/(www\.)?github\.com\/[a-zA-Z0-9-]+\/?$/;
124+
const githubProfilePattern = /^https?:\/\/(www\.)?github\.com\/[a-zA-Z0-9-]+\/?$/;
125125
if (!url || url === '') {
126126
return true;
127127
}

0 commit comments

Comments
 (0)