Skip to content

Commit

Permalink
fix: Allow slash at domain end (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Oct 16, 2024
1 parent b395299 commit 8b52e59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ ajv.addFormat('customUrl', {
ajv.addFormat('domain', {
validate: (value: string) => {
if (!value) return false;
return !!value.match(/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/);
return !!value.match(
/^(https:\/\/)?([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}(\/)?$/
);
}
});

Expand Down

0 comments on commit 8b52e59

Please sign in to comment.