You could simulate it. Do what SlyMaelstrom said, compare the char to a number, if its not 0-9 then clear the screen, replace what was there and make them enter again.