Skip to content

Commit

Permalink
update validataion regex for linkedin and github to support http (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
devksingh4 authored Sep 11, 2024
1 parent 39e13a6 commit 68d5f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clientv2/src/pages/student/StudentProfile.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function StudentHomePage() {
}

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

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

0 comments on commit 68d5f75

Please sign in to comment.