Open ricardogama opened 7 years ago
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:
group
Validator.validate
options
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.
This PR updates the last
group
argument ofValidator.validate
method to be an options object. To validate with assertion groups, thegroup
option can be provided on theoptions
argument:This is a breaking change but will enable adding more optional features in a scalable manner, as the ones proposed on #60 and #61.