mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
remove punctuation and limit tag length
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user