-
-
Notifications
You must be signed in to change notification settings - Fork 398
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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. |
||
assert form.a.data is None | ||
assert form.a.raw_data == ["v"] | ||
assert form.a() == """<input id="a" name="a" type="text" value="v">""" | ||
assert form.a() == """<input id="a" name="a" step="any" type="number" value="v">""" | ||
assert form.b.data == -15.0 | ||
assert form.b() == """<input id="b" name="b" type="text" value="-15.0">""" | ||
assert ( | ||
form.b() == """<input id="b" name="b" step="any" type="number" value="-15.0">""" | ||
) | ||
assert not form.a.validate(form) | ||
assert form.b.validate(form) | ||
form = F(DummyPostData(a=[], b=[""])) | ||
|
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