
var validator = require('validator');

function invalidEmail(email){
	//use node-enfore library
	return !validator.isEmail(email);
}

function invalidPassword(password){
	var min = 8;
	var max = 16;
	return !validator.isLength(password, min, max);	
}
//function validToken(token){
//	checks.add("testToken", enforce.ranges.length(36, 36, "bad token"))
//	checks.check({
//		testToken : token
//	}, function (err) {
//		console.log(err);
//	});
//}

exports.invalidPassword = invalidPassword;
exports.invalidEmail = invalidEmail;
//exports.validToken = validToken;

@@ -194,16 +194,18 @@
  = 16;%0A%09
+//
 return !
@@ -243,17 +243,71 @@
 n, max);
-%09
+%0A%09return !(password.length%3C=max&&password.length%3E=min);
 %0A%7D%0A//fun

Update controllerUtils.js