title: I'm able to change a letter in "username" to a capital letter and register still with the same username. How do I fix this?
body: <p>I have user accounts consisting of a [display_name, username, email, password]. When registering a person will have to enter these credentials. The problem is if a user already have a username of 'Juice' another user can register with the username 'juice'. How can I prevent this?</p>
  
  <p>For example twitter won't let a user register with the same handle even if they change a letter to capital.</p>
  
  <p>I have it where certain things are set to unique in the database but that doesn't help that problem. I'll be honest I'm lost! This is my first project even though it is walk through (to see how everything goes together) I've been putting my own spin on things.</p>
  
  <pre><code>    # models.py for user
  
      class User(db.Model, UserMixin):
      id = db.Column(db.Integer, primary_key=True)
      display_name = db.Column(db.String(20), nullable=False)
      username = db.Column(db.String(20), unique=True, nullable=False)
      email = db.Column(db.String(120), unique=True, nullable=False)
      image_file = db.Column(db.String(20), nullable=False, 
                             default='default.jpg')
      password = db.Column(db.String(30), nullable=False)
      posts = db.relationship('Post', backref='author', lazy=True)
  
      # what a user looks like
      def __repr__(self):
          return f"User('{self.display_name}', '{self.username}', 
                        '{self.email}', '{self.image_file}')"
  
  
  
      # forms.py for RegistrationForm
  
      class RegistrationForm(FlaskForm):
          display_name = StringField('Display Name', validators= 
                                     [DataRequired(),          
                                     Length(min=2, max=20)])
          username = StringField('Username', validators=[DataRequired(), 
                                  Length(min=4, max=20)])
          email = StringField('Email', validators=[DataRequired(), 
                               Email()])
          password = PasswordField('Password', validators=[DataRequired(), 
                                    Length(min=6, max=30)])
          confirm_password = PasswordField('Confirm Password', validators= 
                             [DataRequired(), EqualTo('password')])
          submit = SubmitField('Sign Up')
  
          # stops same user credentials from signing up
          def validate_username(self, username):
              user = User.query.filter_by(username=username.data).first()
          if user:
              raise ValidationError('That username is taken. Please choose 
                                    another one')
  
          def validate_email(self, email):
              user = User.query.filter_by(email=email.data).first()
          if user:
              raise ValidationError('That email address is taken. Please 
                                     choose another one')
  </code></pre>
  
  <p>I want my application to not let a person register with a username like another. 
  For ex. 
  registered username 'juice'
  a user can still register with the same username if they capitalize a letter like 'Juice"</p>