I am using angular 10 and reactive forms. I need a input to only accept (letters, numbers, and this 2 characters "_" and "-") I've tried letters and numbers with this:
Validators.pattern('[a-zA-Z ][0-9]*')]
The above only works if I do it this way:
Validators.pattern('[a-zA-Z ]*')]
But I also need it to allow numbers and - and _
How can I do this?