I want the validity of the decimal not to be equal to 0.5.05, as well as the natural number.
For the natural, I did not use this template /^[0-9]{1,7}$/.
/^[0-9]{1,7}$/
What pattern will I use for decimal no and natural no together?
I think this should work. /^[0-9]{1,7}(\.[0-9]+)?$/
/^[0-9]{1,7}(\.[0-9]+)?$/
Use /^-?[0-9]\d*(\.\d*)?$/
/^-?[0-9]\d*(\.\d*)?$/