Releases: RussellLuo/validating
Releases · RussellLuo/validating
v3.0.0
v3.0.0-beta.1
Improve several validator factories (3a2cb10).
Major changes (Since v3.0.0-beta.0):
- Enhance
MapandSliceby leveraging Go generics - Add
Nested, and remove redundantLazy - Remove
EachMapValue(useMapinstead) - Remove
Each(useSliceinstead) - Remove
Assert(useIsinstead)
v3.0.0-beta.0
Significant overall improvements (9a71a15).
Major changes:
- Change the
Fieldstruct, which now holds the raw value to be validated as aninterface{} - Change the
Validatorinterface, whose methodValidatenow takes*Fieldas the type of its argument - Rewrite most of the existing validator factories by leveraging Go generics (Go 1.18 is required)
- Add
Each,EachMapValue,Is,LenStringandLenSlice, and removeLen - Change the
Errorstype, which now supports a methodMapto convert the errors to amap[string]Error
This introduces large breaking changes, so we increment the major version to v3.