Skip to content

Commit aca4924

Browse files
authored
docs: clarify double escaping of regex (#426)
1 parent 25c41dd commit aca4924

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/the-complete-guide/part1/5-data-validation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ We can use data validation to improve our app's robustness in many places. Two s
8686
}
8787
```
8888
89+
:::info
90+
The argument of the `@regex` attribute is a regular expression string, so regex character escapes like `\d`, `\w` need to be double escaped as `\\d`, `\\w`.
91+
:::
92+
8993
Rerun generation and start REPL:
9094
9195
```bash

0 commit comments

Comments
 (0)