I wrote a javascript validation script to validate if the URL contains '+' or whitespaces.
$.validator.addMethod("reportFileURL",
function(value,element){
if(((value.search(/[+]+/)) == -1)
&& ((value.search(/[ ]+/))) == -1){
return true;
}
},"Invalid filename");
Can i write the script more precise than this.
if (value.search(/[\s+]/) == -1) {
return true;
}