An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
Hello,
While trying to check a validation.Errors stack, I would have liked to make an expected stack then compare it to actual state through an errors.Is comparison on the stack.
That is currently impossible as errors.Is by default will assert that pointers object are exactly the same.
Would it be acceptable to add an Is implementation witch will assert that for each fields present, the error is the expected one ?
I don't think it is that use full outside of testing though but there could be some reason to introspect errors stack on the fly in some code I guess.
Hello, While trying to check a validation.Errors stack, I would have liked to make an expected stack then compare it to actual state through an errors.Is comparison on the stack. That is currently impossible as errors.Is by default will assert that pointers object are exactly the same. Would it be acceptable to add an Is implementation witch will assert that for each fields present, the error is the expected one ? I don't think it is that use full outside of testing though but there could be some reason to introspect errors stack on the fly in some code I guess.