ow
ow copied to clipboard
how to add a predicate to ofType
I've try doing
- ow.array.ofType((val) => { .... });
- ow.array.validate({validator: (val) => {} }
It always throws an error related to the parameter being sent to my callbacks. Thoughts?
You need to pass in a valid validator, e.g. ow.array.ofType(ow.string)
. It would be helpful to see your implementation of the callback if that isn't to your needs.