* Validation framework functional

* Use validation for FSE, NUA, etc.
* Switch to nua.js from apply.js (MenuModule + validation)
This commit is contained in:
Bryan Ashby 2015-12-12 15:52:56 -07:00
parent e4cfb2b92e
commit da5d88d20d
7 changed files with 121 additions and 75 deletions

View file

@ -64,22 +64,3 @@ AreaPostFSEModule.prototype.enter = function(client) {
AreaPostFSEModule.super_.prototype.enter.call(this, client);
};
AreaPostFSEModule.prototype.validateToUserName = function(un, cb) {
var self = this;
if(!un) {
cb(new Error('Username must be supplied!'));
return;
}
if(!self.isLocalEmail()) {
cb(null);
return;
}
user.getUserIdAndName(un, function uidAndName(err, userId, userName) {
self.toUserId = userId;
cb(err);
});
};