remove punctuation and limit tag length

This commit is contained in:
barisusakli
2014-05-21 20:20:44 -04:00
parent 90cea84af9
commit 56f442f283
3 changed files with 8 additions and 4 deletions

View File

@@ -126,6 +126,9 @@
return str;
},
removePunctuation: function(str) {
return str.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()?]/g, '');
},
isEmailValid: function(email) {
return typeof email === 'string' && email.length && email.indexOf('@') !== -1;