I am trying to get it so that the validator tells you \"username must be alphanumeric\". This is my code so far. I have confirmed that it validates at the correct time. The
How about adding the error code:
user = CharField( max_length=30, required=True, validators=[ RegexValidator( regex='^[a-zA-Z0-9]*$', message='Username must be Alphanumeric', code='invalid_username' ), ] )