var validateFileName = function (value){ var specialCharacters = new RegExp("[\\\\\/:*?\"<>|#{}%~&]"); if (specialCharacters.test(value)) { return true; } else{ return false; } }Only thing to note is that \\\\ is needed to represent \ in the regular expression, see this for more details
No comments:
Post a Comment