An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
MIT License
3.73k
stars
224
forks
source link
Add MarshalJSON method to the error validation structs. #1
Per https://github.com/golang/go/issues/10748 , marshalling an error creates unexpected results.
For example, marshaling validation.Errors results in a response like {"Email": {}, "Name": ""} where the error message is blank.
Per https://github.com/golang/go/issues/10748 , marshalling an
error
creates unexpected results. For example, marshalingvalidation.Errors
results in a response like{"Email": {}, "Name": ""}
where the error message is blank.