alphanumeric = RegexValidator('^[0-9a-zA-Z]*$',
    'Only alphanumeric characters are allowed.')
name = models.CharField(max_length=50, blank=True, null=True, validators=[
    alphanumeric])
How can I make a Django form field contain only alphanumeric characters