-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Milestone
Description
Currently user have to put validator in handler or facade layer to check basic input, separate it to new layer or class would make it more clean.
config should look like this after add validator
'get:path': { facade: 'Class.method', validator: 'SampleValidator' }
and SampleValidator class should have only one method to check input
var SampleValidator = function() {
//constructor defined pattern or fields
}
SampleValidator.prototype.check = function (input, callback) {
result = { validate: true/false, fields: [] };
callback(result);
}
Reactions are currently unavailable