-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Support for pattern-matched rules #678
Comments
Above code won't work. For |
@musaffa right, thanks - just updated the example. The actual part that needs to be implemented is the |
@solnic Hi, Is there any update about this feature? |
@musaffa hey there, no, nobody has had the time to work on this yet. There's a lot of more important things to do in validation/schema so this needs to wait. |
@solnic I can help with implementing this feature. For that, I'll need some guidance from you. |
@musaffa that's cool! Feel free to grab this issue. I don't really have any specific idea how to implement this so you need to experiment a bit. Rules are captured via # inside rule.rb
def if(*args)
Guard.new(self, args: args)
end This Yeah...this needs some experimentation to see what makes more sense 🙂 |
Thanks. I'll look into it. |
@musaffa I'd start with this additional top-level method, actually 🙂 |
Noted. |
Any news on this? would this also be covering rules that has more than one key?
|
In order to make defining rules that depend on additional conditions nicer, we can have something like this:
See the original conversation: #540 (comment)
The text was updated successfully, but these errors were encountered: