I want to allow only the following characters in a string: digits, parentheses and the plus sign, which is [0-9] ( ) +
I can’t seem to get a combination to get the validator to return true, the only option seems to be an list of every other possible character that’s NOT allowed… which would make for a large list!
Am I missing something?
This should work:
The regex I gave you there also accepts the empty string. If you want to disallow empty then change the
*near the end to a+.