gody v2.2.0 Release Notes
Release Date: 2020-11-30 // over 4 years ago-
๐ Changed structure for module version
commit b12bd3f
Previous changes from v2.0.0
-
Validator struct
Validate more clean for source code
validator := gody.NewValidator()if validated, err := validator.Validate(/*struct*/); err != nil { ... }
On demand rules
...if err := validator.AddRules(/*...rules*/); err != nil { ... } ...
๐ Support for set a custom tag name
...if err := validator.SetTagName(/*name*/); err != nil { ... } ...
๐ Raw functions support
RawSerialize receive tag name and the struct to validate.
func RawSerialize(tn string, b interface{}) ([]Field, error)
RawValidate receive the struct to validate, tag name and custom rules.
func RawValidate(b interface{}, tn string, rules []Rule) (bool, error)
0๏ธโฃ RawDefaultValidate receive the struct to validate, tag name and custom rules.
func RawDefaultValidate(b interface{}, tn string, rules []Rule) (bool, error)
๐ฑ > ๐
DefaultValidate
andRawDefaultValidate
it's same, both uses as default rules built-in gody.โ Remove the necessity for tag in struct and slice validation
issue #9