Textinput currency format

i want to make a textinput where a person can type in a price. I used “restrict” to only allow numbers and decimal. But the person can type in several decimals and create numbers like 11.1.1.1 or 11…11 or 1.11111

i want to restrict the entry to only one use of a decimal and only two numbers after the decimal.

any other way to format a textinput to a currency format?
thanks