We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e4f037 commit eb99310Copy full SHA for eb99310
doc.go
@@ -36,7 +36,7 @@ You get the idea. Package validator allows one to define valid values as
36
struct tags when defining a new struct type.
37
38
type NewUserRequest struct {
39
- Username string `validate:"min=3,max=40,regexp=^[a-zA-Z]$"`
+ Username string `validate:"min=3,max=40,regexp=^[a-zA-Z]*$"`
40
Name string `validate:"nonzero"`
41
Age int `validate:"min=18"`
42
Password string `validate:"min=8"`
0 commit comments