Skip to content

Commit

Permalink
update regex to allow one char domains in DNS routing modal
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jun 26, 2024
1 parent b4b6d92 commit 9671ce4
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-]{1,63}(?<!-)\.){0,126}(?!-)[a-zA-Z0-9\u00A1-\uFFFF-]{1,63}(?<!-))$/u;
/^(?!.*\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;
try {
const minMaxChars = [1, 255];
const isValidDomainLength =
Expand Down

0 comments on commit 9671ce4

Please sign in to comment.