In Angular 8 I need to validate if a string is equal to yes
allowing:
Spaces, and only spaces, before and after.
Case insensitive so
Yes
,YES
, ... would be allowed.
I tried the following regex Regexr:
^(?i)yes$
But I get an error:
(?i) is not allowed in Javascript
And I am not allowing spaces between and after.