-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FloatField use NumberInput by default #679
base: main
Are you sure you want to change the base?
Conversation
85f13cb
to
a9b033e
Compare
Hi @Demetriex , this looks good! A couple things to add perhaps is: Add some tests verifying the behavior:
I also left some comments on the changes for you to take a look at. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a couple more checks and validations to follow the spec.
@@ -818,7 +818,7 @@ class FloatField(Field): | |||
is ignored and will not be accepted as a value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for this class needs to be updated
@@ -13,9 +13,11 @@ def test_float_field(): | |||
form = F(DummyPostData(a=["v"], b=["-15.0"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to test the "step" values association to the float input data. So a step of "any" is good with "1.234" but a step of "0.1" should not validate a "1.234" input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your input, it looks like this related to this issue #658.
FloatField should use NumberInput #677