Skip to content

Commit 86d0b18

Browse files
authored
validate ctf profile url also (#36)
1 parent 1a46093 commit 86d0b18

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/api/user/register/route.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ export async function POST(request: Request) {
278278
if (portfolio_link && !validateURL(portfolio_link)) {
279279
errors.portfolio_link = "Invalid portfolio URL";
280280
}
281+
if (ctf_profile && !validateURL(ctf_profile)) {
282+
errors.ctf_profile = "Invalid CTF profile URL";
283+
}
281284

282285
if (Object.keys(errors).length > 0) {
283286
console.error("Registration validation errors:", errors);

0 commit comments

Comments
 (0)