go-ozzo / ozzo-validation

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

Closed v4n closed 8 years ago

v4n commented 8 years ago

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.

qiangxue commented 8 years ago

Thank you very much!