Skip to content

Update validate group argument to options object#63

Open
ricardogama wants to merge 1 commit intoguillaumepotier:masterfrom
seegno-forks:feature/group-argument-as-options-object
Open

Update validate group argument to options object#63
ricardogama wants to merge 1 commit intoguillaumepotier:masterfrom
seegno-forks:feature/group-argument-as-options-object

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