hi, how can i not allow these chars: \ / " ' [ ] { } | ~ ` ^ &
using javascript regular expression pattern thanks a lot
hi, how can i not allow these chars: \ / " ' [ ] { } | ~ ` ^ &
using javascript regular expression pattern thanks a lot
Check a string contains one of these characters:
if(str.match(/[\\\/"'\[\]{}|~`^&]/)){
alert('not valid');
}
Validate a whole string, start to end:
if(str.match(/^[^\\\/"'\[\]{}|~`^&]*$/)){
alert('it is ok.');
}