We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ebee98 commit e78c35bCopy full SHA for e78c35b
src/utils/helpers.ts
@@ -42,7 +42,7 @@ export const sleep = (ms: number) => {
42
export const validator = {
43
isValidDomain: (domain: string) => {
44
const unicodeDomain =
45
- /^(?!.*\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-]{1,63}(?<!-)\.)+(?!-)(?!.*--)[a-zA-Z0-9\u00A1-\uFFFF-]{2,63}$/u;
46
try {
47
const minMaxChars = [1, 255];
48
const isValidDomainLength =
0 commit comments