-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the attributes in struct fields
This commit adds support for the following attributes in the struct fields: - "minimum": for numeric fields, via `minimum:"value"` struct tag - "maximum": for numeric fields, via `maximum:"value"` struct tag - "minLength": for string fields, via `minLength:"value"` struct tag - "maxLength": for string fields, via `maxLength:"value"` struct tag - "enums": via `enums:"value1,value2,value3"` struct tag - "default": via `default:"value"` struct tag All these tags except "default" are also supported in "array" fields.
- Loading branch information
Nikolai Obedin
committed
Nov 6, 2018
1 parent
c0507b2
commit 1095ca5
Showing
5 changed files
with
126 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters