I also want to strip dots and commas from a $POST input value (string) and then convert it to a number and also need to edit the expression manually to work around the Field is required
alert.
This expression indeed strips the commas from the string and converts it to a string:
$_POST.value.replace(',', '').toNumber()
This also works as expected:
$_POST.value.replace(’.’, ‘’).toNumber()
But the combination always returns 0
:
$_POST.value.replace(',', '').replace('.', '').toNumber()
So, “How to strip multiple characters/words from a string” in 2021?