console.log(Joi.validate('2015-02-21T00:52:43.822Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43.822', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52:43', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52Z', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00:52', Joi.date().iso())); // error:null
console.log(Joi.validate('2015-02-21T00Z', Joi.date().iso())); // "value" must be a valid ISO 8601 date
Created
February 4, 2019 13:56
-
-
Save a0viedo/f13ce3105df11cacddc99885c19b68f8 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment