File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ Constraints aren't validation for parameters. If constraint aren't valid for par
162
162
| range(min,max) | : age <range(18,120)\> | 91 (Integer value must be at least 18 but no more than 120) |
163
163
| alpha | : name <alpha\> | Rick (String must consist of one or more alphabetical characters, a-z and case-insensitive) |
164
164
| datetime | : dob <datetime(2006\\\\ -01\\\\ -02)\> | 2005-11-01 |
165
- | regex(expression) | : date <regex(\\ d{4}-\\ d{2}-\\ d{2})} \> | 2022-08-27 (Must match regular expression) |
165
+ | regex(expression) | : date <regex(\\ d{4}-\\ d{2}-\\ d{2})\> | 2022-08-27 (Must match regular expression) |
166
166
167
167
** Examples**
168
168
@@ -203,7 +203,7 @@ app.Get("/:test<min(100);maxLen(5)>", func(c *fiber.Ctx) error {
203
203
204
204
Fiber precompiles regex query when to register routes. So there're no performance overhead for regex constraint.
205
205
``` go
206
- app.Get (` /:date<regex(\d{4}-\d{2}-\d{2})} >` , func (c *fiber.Ctx ) error {
206
+ app.Get (` /:date<regex(\d{4}-\d{2}-\d{2})>` , func (c *fiber.Ctx ) error {
207
207
return c.SendString (c.Params (" date" ))
208
208
})
209
209
You can’t perform that action at this time.
0 commit comments