Main validator method, returns a Promise that throws an error
when something is invalid according to schema set up, or true when all validations are fine.
Parameters
model: any
the object that represents the model, with key and values to be validated e.g. { name: 'Emmanuel' }
Main validator method, returns a Promise that throws an error when something is invalid according to schema set up, or true when all validations are fine.