title: Overriding default error messages in email input widget in django
body: <p>I am trying to override the default invalid email error message in Django. As the Django Doc says, the following code should work, but it's not. How can I adjust it?</p>
  
  <pre><code>class BootstrapAuthenticationForm(AuthenticationForm):
  forms.Form.error_css_class = 'error'
  email = forms.EmailField(max_length=254,
                              error_messages={'required': 'Please enter a valid email address.',
                                              'invalid': 'Please enter a valid email address.'},
                             widget=forms.EmailInput({
                                 'required': True,
                                 'class': 'form-control', 
                                 'placeholder': 'E-mail address',
                                 }))
  </code></pre>
  
  <p>And, the error_css_class is not working properly: there is no change at all. What's wrong with this setting?</p>
  
  <p>Thanks in advance. </p>