Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

joi validate

const schema = Joi.object({
    username: Joi.string()
        .alphanum()
        .min(3)
        .max(30)
        .required(),

});
schema.validate({ username: 'abc', birth_year: 1994 });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #joi #validate
ADD COMMENT
Topic
Name
5+2 =