Hi,
I'm having an issue implementing a constraint to a text field in a survey I'm designing. The string input can be any length, but it can only consist of the characters 0, 1, and 2. Any other character should throw a flag. What I've currently implemented is:
This tends to work -- however, it only works for the first two characters in the string. If the string is any longer than two characters, it throws the constraint flag (strangely, the error message appears like this, instead of tied to the question, as it usually does/should) :

I have no experience writing regex, so any help would be useful. Thank you!