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

Update validate group argument to options object #63

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

Conversation

ricardogama
Copy link

@ricardogama ricardogama commented Nov 25, 2016

This PR updates the last group argument of Validator.validate method to be an options object. To validate with assertion groups, the group option can be provided on the options argument:

Validator.validate({ foo: 'bar' }, {
  foo: [is('bar').equalTo('bar'), is('biz').equalTo('biz')]
}, {
  group: 'bar'
});

This is a breaking change but will enable adding more optional features in a scalable manner, as the ones proposed on #60 and #61.

@ricardogama ricardogama force-pushed the feature/group-argument-as-options-object branch 2 times, most recently from 8288280 to bebac1a Compare November 28, 2016 10:33
@ricardogama ricardogama force-pushed the feature/group-argument-as-options-object branch from bebac1a to ad34122 Compare November 28, 2016 14:02
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