Answer the question
In order to leave comments, you need to log in
Why after autocomplete input regex gives wrong value?
I can't quite figure out what's wrong.
There is an input field where the amount is entered. After entering the value, the amount is converted for me like this
const newVal = value.Amount.toString().replace(/\s/, '').replace(/,/g, '.');
/^(\d+\.|\d*[1-9])\d*$/.test(newVal)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question