Skip to content

Commit d955ae9

Browse files
schmidsigskril
andauthored
Update src/pages/web/ensv2-readiness.mdx
Co-authored-by: Greg <[email protected]>
1 parent be78cb9 commit d955ae9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pages/web/ensv2-readiness.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ This is **incorrect** because it excludes DNS names imported into ENS (like `ens
5353

5454
### Correct Pattern: Match All Valid Domains
5555

56-
Instead, your integration should match any valid domain name with a regex like this:
56+
Instead, your integration should treat any dot-separated string with as a potential ENS name. For example, `a.co` should be treated as a potential ENS name.
5757

58-
```regex
59-
^(?:[\dA-Za-z-]+\.)+[A-Za-z]{2,}$
60-
```
58+
```js
59+
if (input.includes('.') && input.length > 2) {
60+
// ...
61+
}
6162
6263
:::info
6364
Note that inputs should always be [normalized](/resolution/names).

0 commit comments

Comments
 (0)