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
Map
andSlice
by leveraging Go generics - Add
Nested
, and remove redundantLazy
- Remove
EachMapValue
(useMap
instead) - Remove
Each
(useSlice
instead) - Remove
Assert
(useIs
instead)
v3.0.0-beta.0
Significant overall improvements (9a71a15).
Major changes:
- Change the
Field
struct, which now holds the raw value to be validated as aninterface{}
- Change the
Validator
interface, whose methodValidate
now takes*Field
as 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
,LenString
andLenSlice
, and removeLen
- Change the
Errors
type, which now supports a methodMap
to convert the errors to amap[string]Error
This introduces large breaking changes, so we increment the major version to v3.