Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add new option to MoneyType #50707

Closed
@garak

Description

@garak

Description

Currently, the MoneyType in the Form component is forcing the value to a float, using a data transformer.
This cannot be very pleasant when using that type with some external library, like the most famous moneyphp, which requires the value to be an integer.
My proposal is to add a new option (a possible name could be "format"), so the user is not forced to re-cast every value before using it with the Money class. Using "float" as the default of this new option can ensure a full BC.

Example

No response

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