How to set TextBox Input to numbers only?

To make the textbox only type numbers

Check Format text node it may help here.
And change text to float or int then back to text.
Not sure how changing text to number behaves if input string is not numeric.
But if changing it does not make error or crash code its easiest way.

You can use the CommonUI plugin, there is already a TextBox for numbers: