How to limit an InputField to accept only specific characters?

I would like to know how I can limit an InputField to accept only numbers from 0 to 9 and comma.

For example, when I type a decimal number, the field allows me to type only the numbers from 0 to 9. And if I type ’ . ', it will not be accepted, only the comma.

There’s an onValidateInput method you can hook to do custom stuff. See docs.