Skip to content

Commit eb99310

Browse files
committed
Fix the regex example in the documentation.
1 parent 3e4f037 commit eb99310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You get the idea. Package validator allows one to define valid values as
3636
struct tags when defining a new struct type.
3737
3838
type NewUserRequest struct {
39-
Username string `validate:"min=3,max=40,regexp=^[a-zA-Z]$"`
39+
Username string `validate:"min=3,max=40,regexp=^[a-zA-Z]*$"`
4040
Name string `validate:"nonzero"`
4141
Age int `validate:"min=18"`
4242
Password string `validate:"min=8"`

0 commit comments

Comments
 (0)