title: Model Form validation is not working...I dont get why
body: <p>model.py</p>
  
  <pre><code>from django.core.exceptions import ValidationError
  
  def surname_validate(value):
  if value == "123":
      raise ValidationError('is not an even number')
  
  
  class Member(models.Model):
  surname=models.CharField(max_length=50,validators=[surname_validate])
  other_names=models.CharField(max_length=150,null=True, blank=True)
  </code></pre>
  
  <p>forms.py</p>
  
  <pre><code>class MemberEditForm(forms.ModelForm):
  class Meta:
      model=Member
  </code></pre>
  
  <p>When i try to save the form with no inputs, i get the default 'this field is required' error so I know my views are correct. The thing is that my validation for surname field does not work at all and i dont understand. What am I doing wrong here. Why wont it work ??? This is frustrating</p>