Skip to content

Commit

Permalink
update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jun 26, 2024
1 parent 9671ce4 commit b822ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const sleep = (ms: number) => {
export const validator = {
isValidDomain: (domain: string) => {
const unicodeDomain =
/^(?!.*\s)(\.?[a-zA-Z0-9\u00A1-\uFFFF](?!.*\s$)(?!.*\.$)(?:(?!-)[a-zA-Z0-9\u00A1-\uFFFF-]{0,63}(?<!-)\.){0,126}(?!-)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-))$/u;
/^(?!.*\.\.)(?!.*\.$)(?!.*\s)(?:(?!-)(?!.*--)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-)\.)+(?!-)(?!.*--)[a-zA-Z0-9\u00A1-\uFFFF-]{2,63}$/u;
try {
const minMaxChars = [1, 255];
const isValidDomainLength =
Expand Down

0 comments on commit b822ab0

Please sign in to comment.