Skip to content
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

Rule "collections" #41

Open
emlynwest opened this issue Oct 12, 2014 · 3 comments
Open

Rule "collections" #41

emlynwest opened this issue Oct 12, 2014 · 3 comments

Comments

@emlynwest
Copy link
Contributor

Have some way of grouping sets of rules that means they can be easily loaded if needed in one go. This means that 3rd party rule sets can be more easily managed.

@sagikazarmark
Copy link
Contributor

I have some similar idea in my mind: Rule factory.

Currently rules can be added to the validation class which is out of scope IMO.

Rules should be added to a factory which CAN be injected into the validation class. (We should provide a default factory and instantiate it by default if none is injected.) This way we can decouple this logic from the validation class.

@emlynwest
Copy link
Contributor Author

Sounds like a good idea to me, I'd be in favour of having support for multiple factories attached to a validator to allow the multiple rule sets that sparked this issue.

@sagikazarmark
Copy link
Contributor

I would rather make it possible to add custom rules to the default factory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants