Input Field: Restrict to Numbers INCLUDING space?

Hi all, I’m trying to make an input box restricted to characters 0-9 including the space bar.

I can do;

mytext.restrict = “0-9”;

but how do I account for space? any ideas or solutions would be greatly appreciated.