== Reproduction Steps
1. Enable the following settings:
{{{
USE_L10N = True
USE_THOUSAND_SEPARATOR = True
}}}
2. Create a form with an IntegerField with a large max_value set:
{{{
class TestForm(forms.Form):
integer_field = forms.IntegerField(max_value=999999)
}}}
== Expected Result
Form is rendered as
{{{
<input type="number" name="integer_field" max="999999" required
id="id_integer_field" />
}}}
== Actual Result
Form is rendered as
{{{
<input type="number" name="integer_field" max="999,999" required
id="id_integer_field" />
}}}
Note the comma separator in the max attribute on the input.
Internet Explorer 11 treats this field as having a max attribute of 999.
So entering a value of 1000 in the field prevents the user from submitting
the form.
--
Ticket URL: <https://code.djangoproject.com/ticket/28303>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
581879a510e58841e5780a5d1fdb4995733d2036 fixed a similar issue and might
be a useful template for developing a patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/28303#comment:1>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8639 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28303#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"3b050fd0d0b8dbf499bdb44ce12fa926298c0bd0" 3b050fd]:
{{{
#!CommitTicketReference repository=""
revision="3b050fd0d0b8dbf499bdb44ce12fa926298c0bd0"
Fixed #28303 -- Prevented localization of attribute values in the DTL
attrs.html widget template.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28303#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"f0ec88fb63f39db38ab027477167f9d7a7ea151c" f0ec88fb]:
{{{
#!CommitTicketReference repository=""
revision="f0ec88fb63f39db38ab027477167f9d7a7ea151c"
[1.11.x] Fixed #28303 -- Prevented localization of attribute values in the
DTL attrs.html widget template.
Backport of 3b050fd0d0b8dbf499bdb44ce12fa926298c0bd0 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28303#comment:4>