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

Support changes made when multiple fields rules match the target #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheCognito
Copy link

In the case where multiple "fields" have been registered that may overlap, allow the validation logic to apply to targets that have been changed that match multiple rules (e.g. if addField('input[min]', ...) was registered separate from addField('input[max]', ...), but a form input potentially supports both)

I appreciate this may be slightly outside the intent of addField as I'm treating it conceptually a bit more like an addRule to a particular "category of fields", but it helped my use case when attempting to have lots of small pieces of generic reusable rules rather than handcrafting for a particular form quite so specifically.

In the case where multiple "fields" have been registered (e.g. logic attached to "input[min]" fields and a separate rule attached to "input[max]" fields), allow the validation to apply to targets that have been changed that match both rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant