I have an array like this
var invalidChars = ["^", "_", "[", "]"];
var inputText = "abc^" - true
var inputText = "abc_" - true
var inputText = "abc" - false
Can someone please let me know how I can check if my input line contains any elements in the array using jQuery / Javascript?
I tried $ .InArray and indexof. it does not work like those that check the whole string.
Lamps source
share