Make UI Input Field only accept numbers and quotes

I have a UI input field. I need to make it so it only accepts certain characters. 0-9. A decimal point and backslash. And single and double quotes. Basically I need to input measurements in feet and fractional or decimal inches. This is regarding mobile keyboard inputs.

Something like : 4’ 7 1/2"

I can get numbers, but no quotes. Otherwise I have to deal with letters that aren’t valid.

Another kind of option would be to default to the number keyboard on the device.

Any suggestions?

If that’s not enough then you need to get the character on the ui input event.