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

Could I concatanate two or more validations together? #41

Closed dan-leech closed 6 years ago

dan-leech commented 6 years ago

I have a struct validation and a separate field validation. I need that all errors would be in one map.

Could I implement it with lib methods?

qiangxue commented 6 years ago

You may merge two validation results into a single validation.Errors. It's a simple foreach loop of one of the results.