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 method Skip.When() #123

Closed maratori closed 4 years ago

maratori commented 4 years ago

Fix #122

Add method Skip.When() to be able skip validation based on condition. It' necessary in cases of nested structs validation. Because When(..., Skip) is not the same as Skip.When(...) (see #122).

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.003%) to 99.336% when pulling 06f4b6f78c9c31a39b369e2d66950e37aceb7e65 on maratori:skip-when into 6a5d431825ff01ddbdfe521883db9e7a514a7664 on go-ozzo:master.

qiangxue commented 4 years ago

Excellent work! Thank you very much!