Created
March 15, 2017 10:41
-
-
Save georgioupanayiotis/d2f432d53ab49e82185ef7d6abb6b735 to your computer and use it in GitHub Desktop.
Example - Simple Joi Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stringSchema = Joi.string().min(3).max(30); | |
Joi.validate(‘valid string’, stringSchema, | |
function(error,val) { | |
//do stuff | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
joi simple example