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
Deep strict validation #10
Deep strict validation #10
Conversation
@NathanielWroblewski This looks interesting. I'll have time next week to explore the idea in more detail. What do you think of the idea of doing away with shallow strict validations and making strictness deep always? Fewer methods and parameters to pass around that way, and fewer edge cases to test (like making sure shallow checks really are shallow). Maybe with a minor version bump. |
I think that makes sense. My initial expectation was that I also share your concern that those changes could break existing implementations, that's why I added this as a separate method. But if you're considering a version bump with these changes, and as long as the interface supports an option for running shallow validations in strict mode for users who need time to update or who do not wish to update, I think that would be a better change. Let me know if I can be of any help. |
One other concern that may be worth mentioning, is the increasing arity of the validate/validate_strict methods and their order not matching here. It would perhaps be better to pass a hash of options:
|
I'm considering keyword arguments to avoid arity explosion and to avoid |
Superseded by #15 |
Thank you for the great work on this! I really appreciate the rapid progress! |
@mike-bourgeous Adds deep strict validation of schemas to address #9
Open to feedback and changes.