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 c03d102 commit 77cba15Copy full SHA for 77cba15
1 file changed
content/posts/2020-05-25-getting-help-from-your-compiler/index.md
@@ -603,7 +603,7 @@ New version:
603
604
```typescript
605
const digits = (n: number) =>
606
- O.fromPredicate((s: string) => new RegExp(`\^\[0-9\]\{${n}\}\$`).test(s))
+ O.fromPredicate((s: string) => new RegExp(`^[0-9]{${n}}$`).test(s))
607
608
const phoneValidator = flow(
609
digits(8),
0 commit comments