added function to check for invalid characters
This commit is contained in:
parent
f4f8cbc7e9
commit
07c6805fd5
1 changed files with 12 additions and 0 deletions
|
|
@ -45,4 +45,16 @@ function scheduler() {
|
|||
|
||||
function onStart() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* functin checks if the string passed contains special characters like
|
||||
* spaces, brackets etc.
|
||||
*/
|
||||
|
||||
function isClean(str) {
|
||||
var validChar = new RegExp("[^a-z,^A-Z,^0-9]");
|
||||
if (validChar.exec(str))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue