-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for denied_with and denied_without #660
Comments
Aren't those similar to |
Played around with FieldExcludes https://play.golang.org/p/rhRupsq_cnM and strings.Contains(field.String(), currentField.String()) is not what I need. The idea for eg denied_with is that if there is x then there must not be a y and the idea for denied_without is that if x is not there then y must not be there. |
You mean
? |
Since FieldExcludes currently uses strings.Contains, means it has a purpose - x string must not contain y string. I don't know if anyone uses it like that though. I proposed clear names and analogy for required_with, required_with_all, required_without, required_without_all (most of the same code can be used) for creating denied_with, denied_with_all, denied_without, denied_without_all. And the idea is denied_with is that if there is x then there must not be a y and the idea for denied_without is that if x is not there then y must not be there. |
Agreed. I need this too, actually. I've probably misread |
I would probably have expected |
Closes #660 added excluded with and without
Package version eg. v8, v9:
v10
Issue, Question or Enhancement:
Add support for:
denied_with
denied_with_all
denied_without
denied_without_all
The text was updated successfully, but these errors were encountered: