I want to check my params in my controllers. For the moment, I'm doing like that:
create: function (req, res) {
if(req.params.label && req.params.password){
// do stuff
}
}
But I want to do this more quickly. I'm wondering if there is no tools which already exist.
I want to do things like that:
create: function (req, res) {
checkParams({label: {empty: false}, password: {empty: false}}, function(err){
// Do stuff
});
}
Do you know something which could help me?
Thank you.