Skip to content

Commit 7506423

Browse files
committed
Fix docs
1 parent dff78e9 commit 7506423

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/reference/directives/route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ get /api/users {
5959
Enables HTTP Basic Authentication for the route.
6060

6161
```js
62-
@basic_auth(realm="Admin Area")
62+
@basic_auth
6363
get /admin/dashboard {
6464
// Only users with valid basic auth credentials can access
6565
return "Admin dashboard";

docs/reference/directives/validator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ Validates that a string matches a given regular expression pattern.
7474
post /api/register {
7575
@json
7676
body {
77-
@regex(r"^[a-zA-Z0-9_]+$")
77+
@regex(pattern=r"^[a-zA-Z0-9_]+$")
7878
username: str,
7979

80-
@regex(r"^\d{3}-\d{2}-\d{4}$")
80+
@regex(pattern=r"^\d{3}-\d{2}-\d{4}$")
8181
ssn: str
8282
}
8383
}
@@ -178,7 +178,7 @@ post /api/identifier {
178178
body {
179179
@or([
180180
@format(type="email"),
181-
@regex(r"^\d{10}$")
181+
@regex(pattern=r"^\d{10}$")
182182
])
183183
identifier: str // Can be either email or 10-digit number
184184
}

0 commit comments

Comments
 (0)