bytedance / go-tagexpr

An interesting go struct tag expression syntax for field validation, etc.
Apache License 2.0
1.66k stars 142 forks source link

feat: support stop semantics #35

Closed sikasjc closed 2 years ago

sikasjc commented 3 years ago

close #34

If a custom function returns ErrStop, the field checks after this field where in the same struct are stopped.

Update: Use io.ErrUnexpectedEOF in the validator to indicate an error in the validation.

Hi, since io.EOF is used in validator, I use io.EOF to represent stopping the validation of the current struct fields. Please help to see if this way is possible

andeya commented 3 years ago

Thanks, I will review the code these days, please be patient.