validator
validator copied to clipboard
Mandatory omit a field if some other field equals some value
- [X] I have looked at the documentation here first?
- [X] I have looked at the examples provided that may showcase my question here?
Package version eg. v9, v10:
v10.4.0
Issue, Question or Enhancement:
Mandatory omit a field if some other field is present in the struct already.
Code sample, to showcase or reproduce:
For example-
type A struct{
B string
C string
}
C should definitely not be there if B equals something like "abcd"
The excluded_if tag is needed, as opposed to required_if.
Hello, is excluded_if
implemented at all? I am unable to find it in the documentation nor in the source.
I've added a PR against with #847.