Answer the question
In order to leave comments, you need to log in
How to allow only 2 decimal places to be entered?
It is necessary that in the input field you can enter any number > 1 and, if this is a floating point number, then with no more than two characters after it
. And you need to do this through the rules for the field
Answer the question
In order to leave comments, you need to log in
val => (val.split('.')[1] || '').length < 3 || 'Не более двух знаков после запятой'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question