Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
What are you trying to achieve or the steps to reproduce ?
const Joi = require('@hapi/joi') .extend(require('@hapi/joi-date')); const schema = Joi.date().format('YYYY-MM-DD'); Joi.assert('1', schema) Joi.assert('10', schema) Joi.assert('1000', schema)
If I run it with something like
Which result you had ?
What did you expect ?
exports.ValidationError: "value" must be in YYYY-MM-DD format