Releases: twharmon/govalid
Releases · twharmon/govalid
v1.5.0: Merge pull request #41 from twharmon/err-only
Rewrite
Simpler API
Register
is deprecated and no longer needed.
Custom validation rules
You can add custom validation rules for string, int64, and float64.
v := govalid.New()
v.AddCustomInt64Rule("even", func(field string, value int64) string {
if value%2 == 0 {
return ""
}
return fmt.Sprintf("%s must be even", field)
})
type Foo struct {
Bar int64 `govalid:"req|even"`
}
v1.1.3: Merge pull request #24 from twharmon/flexible-usage
Allow more flexible usage
Update go version to 1.15
Merge pull request #23 from twharmon/go-version-update Update go version