This commit is contained in:
Baris Soner Usakli
2013-08-28 13:47:52 -04:00
parent f1b4367168
commit cc55073107
7 changed files with 158 additions and 129 deletions

View File

@@ -91,11 +91,11 @@
},
isUserNameValid: function(name) {
return (name && name !== "" && (/^[a-zA-Z0-9 _-]{3,14}$/.test(name)));
return (name && name !== "" && (/^[a-zA-Z0-9 _-]+$/.test(name)));
},
isPasswordValid: function(password) {
return password && password.indexOf(' ') === -1 && password.length > 5;
return password && password.indexOf(' ') === -1;
},
// Blatently stolen from: http://phpjs.org/functions/strip_tags/