title: How can I override username validation in Django 1.11?
body: <p>I have <a href="https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#specifying-a-custom-user-model" rel="nofollow noreferrer">a custom user model</a> in my Django 1.11 site, along with <a href="https://pypi.python.org/pypi/django-registration" rel="nofollow noreferrer">django-registration</a>.</p>
  
  <p>On my registration form, I prompt for a username and passphrase. I have added MinimumLengthValidator and custom WordCountValidator validation to the passphrase field in settings.py (see below) -- these validation rules are rendered in the registration form automatically.</p>
  
  <p>Now I want to change the username validation with three rules: length, must start with a letter, may only contain alphanumeric characters. I don't mind combining these into a single rule.</p>
  
  <p>I tried adding <a href="https://docs.djangoproject.com/en/1.11/ref/contrib/auth/#django.contrib.auth.models.User.username_validator" rel="nofollow noreferrer">username_validator</a> to the class and setting that, but nothing happens -- probably because I'm inheriting from AbstractUser not User <a href="https://code.djangoproject.com/ticket/27807" rel="nofollow noreferrer">(related 1.10 bug?)</a>.</p>
  
  <p>How can I use my own validation rule (preferably  multi-clause) on my username field?</p>
  
  <p><strong>Simplified appearance of form:</strong></p>
  
  <pre><code>Username: [     ]
  
  Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
  
  Passphrase: [     ]
  
  Your passphrase must contain at least 15 characters.
  Passphrase must contain at least three words. Use spaces between words.
  
  Passphrase confirmation: [       ]
  
  Enter the same passphrase as before, for verification.
  </code></pre>
  
  <p><strong>settings.py</strong></p>
  
  <pre><code>AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
          'OPTIONS': {
              'min_length': 15,
          }
      },
      {
          'NAME': 'custom.validators.WordCountValidator',
          'OPTIONS': {
              'min_words': 3,
          }
      },
  ]
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class User(AbstractUser):
      objects = UserManager()
  
      def __init__(self, *args, **kwargs):
  
          user = super(User, self).__init__(*args, **kwargs)
          return user
  
      ...
  </code></pre>
  
  <p><strong>validators.py</strong></p>
  
  <pre><code>class WordCountValidator(object):
      ...
  
  class StartLetterValidator(object):
      ...
  
  class AlphanumericValidator(object):
      ...
  
  class CombinedValidator(object):
      ...
  </code></pre>