I am validating a text input. When someone enters something in my text input, I first of all remove the spaces from the input and then check for the existence of any character other than A-Z and a-z. When i validate the input using /^[A-Za-z]+$/.test(input_value), i get my desired result however /[a-z]/gi is not working properly. Is there something i am doing wrong here?
Here is what i want:
abCde //accepted
ABCde //accepted
abcDe3 // not accepted
aSc#-er // not accepted
ABCDE_ // not accepted
ABE_Ed // not accepted