Closed JoeScho closed 6 years ago
The opposite issue existed at one point: https://github.com/tlivings/enjoi/issues/16
I wonder if Joi’s behavior has changed.
Never mind, I see the issue.
So, according to JSON schema specification, an empty string validates as a string, so this is expected behavior. To change, use minLength
.
Thanks @tlivings 👌
By default, the schemas created by enjoi allow empty strings. For example:
Is there a way of disabling this so that the above validation would fail?