validity.required fails for empty object
bengourley opened this issue · comments
I would expect {}
to meet a 'required' constraint for type Object, however the required
validator explicitly checks whether an object has >1 keys.
What's the advantage of the current behaviour?
I'm not sure. But I would need to think hard before changing it. If I work out the use-case I'll document it here.
I've stripped required out now into it's own module. I'm going to make the change you recommended in the standalone version.