Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Joi.validate

function responseValidate(response) {
  const schema = {
    id: Joi.objectId().required(),
    response: Joi.string().min(3).max(512).required()
  };

  return schema.validate(response);
}
Source by www.tabnine.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+4 =