I agree that it makes sense to add the argument to FloatField so we can add
the server-side validation logic. I would also like to see it on
IntegerField for consistency, and since IntegerField also maps to a
NumberInput.

I'd also be against the widget_attributes proposal - there are already too
many ways of configuring form fields/widgets, we don't need another.

On Wed, 17 Mar 2021 at 14:43, Carlton Gibson <carlton.gib...@gmail.com>
wrote:

>
>
> On 17 Mar 2021, at 15:34, Jacob Rief <jacob.r...@gmail.com> wrote:
>
> But FloatField also offers a min_value and max_value. When rendered as a
> widget, they are used as attributes min and max in their input
> field. In addition to that, the field value is validated against a value
> in that range. To be consistent, the same should apply to the step value.
> This would  furthermore allow the field to validate against a multiple of
> that step value. Such a feature currently has to be implemented on the
> project level.
>
>
> If we’re happy to add that extra to forms.FloatField then it would
> alleviate my concern about a pass-through parameter. (At least the field
> would be **doing** something with it.)
>
> (I don’t object if everyone is keen.)
> C.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/8A007E70-C106-4705-B33C-ED8269161546%40gmail.com
> <https://groups.google.com/d/msgid/django-developers/8A007E70-C106-4705-B33C-ED8269161546%40gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM16qkuHG_KXQvhZVitWgiJugxZ-9053UacyUm7jVxULmQ%40mail.gmail.com.
  • Pro... Jacob Rief
    • ... Markus Holtermann
      • ... Jacob Rief
        • ... Josh Smeaton
          • ... Carlton Gibson
            • ... Jacob Rief
              • ... Carlton Gibson
                • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
                • ... Jacob Rief
                • ... Kapil Bansal
                • ... Jacob Rief
                • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
                • ... Jacob Rief
                • ... James Bennett
                • ... Kapil Bansal

Reply via email to