Description
Symfony version(s) affected: 4.4.20 but I guess all versions.
Description
When having arabian language, IntegerType
converts numbers to their language form (am I expressing myself correctly?)
so we have ٣٤٤٣ which is 3443.
This is ok in Firefox, but not ok in Chrome. Chrome expects value
in input type="number
to be 3443
and it does the conversion to ٣٤٤٣
.
How to reproduce
In Chrome: Create simple IntegerType form in Arabian language, persist 3443, then reload form - it will disappear.
Possible Solution
remove IntegerToLocalizedStringTransformer
from IntegerType
?
Additional context
This is the actual error from Chrome:
<input type="number" value="١٢٣٤٩">
results in
The specified value "\u0661\u0662\u0663\u0664\u0669" cannot be parsed, or is out of range.
and rendered input is empty, so it submits empty value.
if we have
<input type="number" value="12349">
It works as expected: