-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: Add KeysInValidator for validating fields containing specific keys #208
feat: Add KeysInValidator for validating fields containing specific keys #208
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to add the default language lines in lang/default.go
.
It is correct and this is how it should be done. 👍🏻 |
Pull Request Test Coverage Report for Build 9555615659Details
💛 - Coveralls |
Implementation looks correct to me. The third test case should expect |
updated, please check |
Pull Request Test Coverage Report for Build 9573218396Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after these minor changes.
Can you move back the validator to a keysin.go
file please? This doesn't belong to the string.go
file since we are validating an object.
Pull Request Test Coverage Report for Build 9611514401Details
💛 - Coveralls |
Thank you very much! 🎉 |
References
Issue(s): #201
Discussion: None
Description
This validator ensures that all keys in the object under validation are part of the specified parameter slice. The main benefits of this addition are:
Possible drawbacks