Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.0] [Form] IntegerType accepts floats - a bit misleading #10240

Copy link
Copy link
Closed
@jameshalsall

Description

@jameshalsall
Issue body actions

The IntegerType supports floats, but as the name suggests it should only accept integers, i.e. whole numbers.

The NumberType supports floats, locale specific numeric strings (e.g. "40,000") etc.

I propose a change to these 2 types:

  • IntegerType: should be used for whole integers as the name suggests
  • NumberType: should be used for floats (rendering as an input[type="number"]), and have a new option (support_locale_strings or something similar) so that it renders as input[type="text"] and has the relevant attached NumberToLocalizedStringTransformer.

This is obviously a BC break so marked it for 3.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.