title: Validate a form field in django with a default value
body: <p>I'm here working with django and I'm having some problems to validate my login form. I want the text areas to appear with a default value, only for esthetic, and then I want to write the real username. The problem is that, I don't want the default value to be admitted, because it is not a correct username. Same with the password. </p>
  
  <p>I post here my code:</p>
  
  <p>forms.py</p>
  
  <pre><code>class AutenticacionForm(forms.ModelForm):
  class Meta:
      model = User
      fields = ['username','password']
      widgets={'password': forms.PasswordInput(),}
  
  def __init__(self, *args, **kwargs):
      super(AutenticacionForm, self).__init__(*args, **kwargs)
      self.fields['username'].help_text = None
      self.fields['username'].label = ""
      self.fields['username'].widget.attrs.update({'required':'true','data-html':'true', 'value':'USUARIO', 'onfocus':'this.value="";', 'onblur':'if(this.value == ""){this.value = "USUARIO";}'})
      self.fields['password'].label = ""
      self.fields['password'].widget.attrs.update({'required':'true','data-html':'true', 'value':'PASSWORD', 'onfocus':'this.value="";', 'onblur':'if(this.value == ""){this.value = "PASSWORD";}'})
  </code></pre>
  
  <p>That's the way my form looks. USUARIO is just a default value, so I don't want the login to admit that value as correct. </p>
  
  <p><a href="https://i.stack.imgur.com/oWY9h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oWY9h.png" alt=""></a></p>