correctly validate '123' and '123a', default branch in switch