-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
Symfony version(s) affected
6.4.* and up
Description
Unsure if this is on purpose or not (and if it is, what the rationale is); but when html5 is set to true, MoneyType only sets the input type to number but it does not check if steps should be set, which ultimately means that one can only enter whole values in the input field, even if a scale larger than 0 is set.
If the current value is 1.12 for example, the field will only accept 0.12 or 2.12 as the next lower/higher value.
How to reproduce
Set html5 to true.
Possible Solution
Implement the same approach that NumberType has: https://github.com/symfony/form/blob/a8f32aa19b322bf46cbaaafa89c132eb662ecfe5/Extension/Core/Type/NumberType.php#L40-L51
Additional Context
No response