Perche non usi:
my_txt.restrict = "0-9";

Ciao Elisa.