FloatField use NumberInput by default#679
Open
Demetriex wants to merge 1 commit intopallets-eco:mainfrom
Open
Conversation
85f13cb to
a9b033e
Compare
Contributor
|
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. |
whb07
suggested changes
Feb 27, 2021
Contributor
whb07
left a comment
There was a problem hiding this comment.
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. | |||
Contributor
There was a problem hiding this comment.
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"])) | |||
Contributor
There was a problem hiding this comment.
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.
Author
There was a problem hiding this comment.
thanks for your input, it looks like this related to this issue #658.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FloatField should use NumberInput #677