Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
min_value should be 1 (since values can start with leading zeroes, i.…
Browse files Browse the repository at this point in the history
…e. 000001)
  • Loading branch information
mtigas committed Sep 30, 2011
1 parent 3fb1bdf commit e624d96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_twofactor/auth_forms.py
Expand Up @@ -12,7 +12,7 @@ class TwoFactorAuthenticationForm(AuthenticationForm):
token = forms.IntegerField(label=_("Authentication Code"),
help_text="If you have enabled two-factor authentication, enter the six-digit number from your authentication device here.",
widget=forms.TextInput(attrs={'maxlength':'6'}),
min_value=100000, max_value=999999,
min_value=1, max_value=999999,
required=False
)

Expand All @@ -36,7 +36,7 @@ class TwoFactorAdminAuthenticationForm(AuthenticationForm):
help_text="If you have enabled two-factor authentication, enter the "
"six-digit number from your authentication device here.",
widget=forms.TextInput(attrs={'maxlength':'6'}),
min_value=100000, max_value=999999,
min_value=1, max_value=999999,
required=False
)
this_is_the_login_form = forms.BooleanField(widget=forms.HiddenInput,
Expand Down

0 comments on commit e624d96

Please sign in to comment.