busypeoples / spected

Validation library
MIT License
703 stars 32 forks source link

Add support for arrays of non-object values #86

Closed jakubkoci closed 7 years ago

jakubkoci commented 7 years ago

I have just been playing around possible solution of #85 for myself and this is the result. Maybe, it helps you somehow. I am just sharing more about my idea.

busypeoples commented 7 years ago

@jakubkoci Thanks! I'll have a look later today and give you feedback!

busypeoples commented 7 years ago

Check #87 We should enable to validate against any array input. How the input is validated is up to the user. We don't care if the input is ['a', 'b'] or ['a', 1, {id: 1}] or [{id:1}, {id: 3}], the corresponding predicate function has to know how to validate the input.

busypeoples commented 7 years ago

I will close this PR now, as #87 has been merged and resolves #85. Thanks for your very valuable input!

jakubkoci commented 7 years ago

Yes. I agree it's way more better solution, even simpler. Thanks for quick update.