title: Django: Constraint on a form field doesn't apply
body: <p>i'm still a beginner in django and i have problem to make something work: </p>
  
  <p>In a from, i have a field which is an integer and which's value can be [0|1|2].</p>
  
  <p>So i made a working stuff like this :</p>
  
  <pre><code>front = forms.IntegerField(label=_('quantity'), initial='', min_value=0, max_value=2)
  </code></pre>
  
  <p>This works correctly and if the fields contains another value, Django triggers an error after submitting. </p>
  
  <p>As i need to use often that kind of field, i made a class of it , which is :</p>
  
  <pre><code>class Quarter(forms.IntegerField):
      def __init__(self, val='', min=0,max=2):
          super(forms.IntegerField, self).__init__()
          self.initial = val
          self.min_value = min
          self.max_value = max
          self.required = True
          self.error_messages = {'required': 'This field is required',
                                 'max_value': 'number is too high',
                                 'min_value': 'number is too low',
                                 'invalid': 'Enter a valid number'}
  </code></pre>
  
  <p>And, in my from class, i call it like this : </p>
  
  <pre><code>rear = Quarter()
  </code></pre>
  
  <p>or </p>
  
  <p>The default parameters should (i think) limit the range of values rear can receive. </p>
  
  <p>But if i enter any value in the rear field, django accept them all, when it refuse it for the front one.</p>
  
  <p>Shouldn't this code work, normally ?
  Can you point me the mistake i do and help me to make it work correctly ?</p>
  
  <p>Thank you.</p>