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 only problem is that no matter what I try, The RegexValidator still chucks the default error ("enter a valid value").
This is my code. I also tried it without the 'message=' in front, and it still said "enter a valid value", instead of "username must be alphanumeric"
user = CharField(
max_length=30,required=True,
validators=[
RegexValidator('^[a-zA-Z0-9]*$',
message='Username must be Alphanumeric'
),
]
)