E
Eugene Anthony
I have received the following feedback for the two functions bellow:
"The ISNUMERIC test is WORTHLESS for checking for an INT value, because
ISNUMERIC will happily accept DOUBLE values, such as 89.11998811777 and
other values that are simply *NOT* INT values."
<%
function isZip(input)
isZip = false
if len(input) = 5 then
isZip = (isNumeric(input))
end if
if len(input) = 10 then
z1 = left(input,5)
z2 = right(input,4)
z3 = mid(input,6,1)
isZip = (isNumeric(z1) and isNumeric(z2) and z3="-")
end if
end function
function isPhone(input)
Dim tempPh
tempPh = replace(input," ","")
tempPh = replace(input,"-","")
tempPh = replace(input,"-","")
tempPh = replace(input,"(","")
tempPh = replace(input,")","")
isPhone = (isNumeric(tempPh))
end function
%>
How do I solve the problem?.
Your help is kindly appreciated.
Regards
Eugene Anthony
"The ISNUMERIC test is WORTHLESS for checking for an INT value, because
ISNUMERIC will happily accept DOUBLE values, such as 89.11998811777 and
other values that are simply *NOT* INT values."
<%
function isZip(input)
isZip = false
if len(input) = 5 then
isZip = (isNumeric(input))
end if
if len(input) = 10 then
z1 = left(input,5)
z2 = right(input,4)
z3 = mid(input,6,1)
isZip = (isNumeric(z1) and isNumeric(z2) and z3="-")
end if
end function
function isPhone(input)
Dim tempPh
tempPh = replace(input," ","")
tempPh = replace(input,"-","")
tempPh = replace(input,"-","")
tempPh = replace(input,"(","")
tempPh = replace(input,")","")
isPhone = (isNumeric(tempPh))
end function
%>
How do I solve the problem?.
Your help is kindly appreciated.
Regards
Eugene Anthony