title: Only accept 2 digits integer array in django model form
body: <p>How to make a form field that accept 2 digit numeric array in frontend. if someone enter more then 2 digit or string then The input value is automatically validated to ensure it is a properly formatted 2 digit integer array.</p>
  <p>right</p>
  <p><a href="https://i.stack.imgur.com/Sp9x0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sp9x0.png" alt="enter image description here" /></a></p>
  <p>wrong below</p>
  <p><a href="https://i.stack.imgur.com/HEcDo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HEcDo.png" alt="enter image description here" /></a></p>
  <p>i want validation like this:</p>
  <p><a href="https://i.stack.imgur.com/VyTXH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VyTXH.png" alt="enter image description here" /></a></p>
  <p><strong>My work</strong></p>
  <p>models.py</p>
  <pre><code>class Jodi(models.Model):
    numb = ArrayField(models.IntegerField(null=True, blank=True), null=True, blank=True)
  </code></pre>
  <p>forms.py</p>
  <pre><code>from django import forms
  from .models import Jodi
  class MyModelForm(forms.ModelForm):
      class Meta:
          model = Jodi
          fields = ['numb',]
  </code></pre>
  <p>views.py</p>
  <pre><code>if request.method=='POST':
          fm = MyModelForm(request.POST)
          if fm.is_valid():
              numbers = fm.cleaned_data['numb']
              numbers1 = []
              for x in numbers:
                  if x:
                      numbers1.append(x)
              X=Jodi.objects.create(numb=numbers1,)
              X.save()
  else:
      fm = MyModelForm()
      return render(request,'myapp/home.html',{'form':fm})
  </code></pre>
  <p>home.html</p>
  <pre><code>&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;{% csrf_token %}
          
        {{ form.as_p }}
          
  </code></pre>