I need a regexfield in a django form to only accept letters and numbers, and nothing else. I've tried this, but it didn't work:
myfield = forms.RegexField(label=("My Label"), max_length=31, regex=r'[a-zA-Z0-9]',
error_message = ("This value must contain only letters and numbers."),
I am not very good at using regular expressions. Can you tell me what I am doing wrong here and how to fix it?