Reorder test to disable letter input.

Test length after testing for digit validity to disable letter input on last digit.