(^\d*\.?\d*$){1,10} โ โ
The value * means zero or more. Therefore, your regular expression means "zero or more times, 1 to 10 times," so {1,10} is redundant in this case. You need to remove * or apply {1,10} only to parts that do not have it.
For example, you can change your regular expression to:
^\d*(\.?\d{0,10})$
This corresponds to numbers that have up to 10 digits after the period. If you want to combine a floating point number having only 10 digits, you can use a negative lookahead (like @ DenysSรฉguret already mentioned in his +1 answer):
(?!.{10})\d*\.?\d*
It matches \d*\.?\d*$ only if its length is <10 (including the point).
source share