﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35435	NumberInput off-by-one on min value for type range	mitch99	nobody	"Follow-up to #35433 which was closed (and I couldn't reopen):

{{{
class ContentProfileDefinitionForm(forms.ModelForm):
    class Meta:
        model = ContentProfileDefinition
        fields = [""other"", ""weight""]
        widgets = {
            ""weight"": forms.NumberInput(
                attrs={
                    ""type"": ""range"",
                    ""step"": ""1"",
                    ""min"": ""1"",
                    ""max"": ""5"",
                }
            ),
        }

class ContentProfileDefinition(models.Model):
    other = models.ForeignKey(""Other"", on_delete=models.CASCADE)
    weight = models.PositiveSmallIntegerField(
        default=1,
        help_text=""Weight"",
        validators=[
            MinValueValidator(1),
            MaxValueValidator(5),
        ],
    )

}}}

I expect the min value on the range input to be 1, but it's actually 0:

{{{
<input type=""range"" name=""form-2-weight"" value=""3"" step=""1"" min=""0"" max=""5"" aria-describedby=""id_form-2-weight_helptext"" id=""id_form-2-weight"">

}}}
"	Uncategorized	closed	Forms	5.0	Normal	duplicate			Unreviewed	0	0	0	0	1	0
