TCSH user input error checking

This was taken down recently because it appeared to be homework, but it isn't. It's for a script I am working on at work. Thanks for the help.

How do you check that user inputs (arguments 1 and 2) are both numbers and are at least 5 digits in length?

This is one way:

#!/usr/bin/tcsh
# Script: test.tcsh

set number = $1
echo $number
if ( $number =~ [0-9][0-9][0-9][0-9][0-9] ) then
  echo Parameter is a number
else
  echo Parameter is not a number OR is not 5 digits
endif


$ test.tcsh 12345
12345
Parameter is a number

$ test.tcsh 99
99
Parameter is not a number OR is not 5 digits

$ test.tcsh adf
adf
Parameter is not a number OR is not 5 digits

Hey,

BASH version is,

if [[ ${#1} -ge 5 && ${#2} -ge 5 && ! $1 =~ "[^0-9]" && ! $2 =~ "[^0-9]" ]];
then
   echo "True"
   # Do your stuff here.
fi

Cheers,
Ranga:)