Open fixe opened 9 years ago
I think that the assert is doing more than it should. This shouldn't be invalid:
validator.validate({ foobar: [], foobiz: '' }, { foobar: [ new Assert().Required(), new Assert().InstanceOf(Array) ], foobiz: [ new Assert().Required() ] });
@guillaumepotier WDYT? Currently I'm overriding the assert but if you agree I can create a PR.
Those look quite valid, if you need to specify a length, maybe you should check Length() too, which works for strings and arrays.
I think that the assert is doing more than it should. This shouldn't be invalid:
@guillaumepotier WDYT? Currently I'm overriding the assert but if you agree I can create a PR.