Answers for "joi_browser__WEBPACK_IMPORTED_MODULE_0___default.a.string(...).pattern is not a function'"

11

joi.validate is not a function

// Try this. Syntax is changed for new version of joi
const schema = Joi.object({ name: Joi.string() .min(6) .required(),
email: Joi.string() .min(6) .required() .email(),
password: Joi.string() .min(6) .required() });

const validation = schema.validate(req.body);
res.send(validation);
Posted by: Guest on October-02-2020

Code answers related to "joi_browser__WEBPACK_IMPORTED_MODULE_0___default.a.string(...).pattern is not a function'"

Code answers related to "Javascript"

Browse Popular Code Answers by Language