Skip to content

Commit c10b0bf

Browse files
authored
Merge pull request #114 from classmethod/fix/domain-validation-113
Fix domain validation rejecting valid domains (#113)
2 parents a4ff23d + b584aaf commit c10b0bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/App.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const DEFAULT_NOTION_URL =
6969
"https://succinct-scar-f20.notion.site/Sample-Web-Site-148f2fc322e74473a91fb4d90836e3ce";
7070

7171
const DOMAIN_PATTERN =
72-
/^((https:\/\/)|(http:\/\/))?[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+(\/)?$/;
72+
/^(https?:\/\/)?([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}\/?$/;
7373
const NOTION_ID_PATTERN = /[0-9a-f]{32}/;
7474

7575
function isValidDomain(domain: string): boolean {

0 commit comments

Comments
 (0)