Skip to content

Commit

Permalink
fix: update domain name regex to accept longer TLDs (#19)
Browse files Browse the repository at this point in the history
- Modified regex pattern to accept TLDs longer than 6 characters
- Changed TLD length limit from {2,6} to {2,}
- Allows domains like .services to be validated correctly

Fixes #19
  • Loading branch information
cornelcroi committed Oct 24, 2024
1 parent 3b8c925 commit 32a1e50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/cli/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export const CLOUDFRONT_HOSTEDZONE_ID = "Z2FDTNDATAQYW2";
export const GITHUB_REGEX =
/^((https:\/\/github\.com\/([^/]+)\/([^/]+))|(git@github\.com:([^/]+)\/([^/]+)))\.git$/;
export const DOMAIN_NAME_REGEX =
/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}$/i;
/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,}$/i;


export const ERROR_PREFIX = "\n\n[ERROR]";

Expand Down

0 comments on commit 32a1e50

Please sign in to comment.