min max values numeric

how i can check a numeric value in range 1000000 to 9999999 if i can only insert max value 999999 ???