title: django form widget number input
body: <p>I have the below code in my forms.py I am trying to get widget on phone to put up an error if the input is not numbers but it does not work. Everything else works. Any reason why the type=number is not pulling up an error on the form?</p>
  
  <pre><code>class UserProfileForm(forms.ModelForm):
  
  
      class Meta:
          model = UserProfile
          exclude = ('user',)
  
          widgets = {
              'first_name': forms.TextInput(attrs={'maxlength':100, 'required': True}),
              'last_name': forms.TextInput(attrs={'maxlength': 100, 'required': True}),
              'phone': forms.NumberInput(attrs={'minlength': 10, 'maxlength': 15, 'required': True, 'type': 'number',}),       
              'date_of_birth': forms.DateInput(attrs={'minlength': 10, 'maxlength': 10, 'required': True}),
  
              'country': CountrySelectWidget(attrs={'country': 'CountrySelectWidget'}),
  
          }
  </code></pre>