On 3/15/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
>
>
> <CFIF Len(Trim(Form.Years))
> and Not IsNumeric(REReplace(Len(Trim(Form.Years)), "[0-9]","","All"))>
Let me talk this out...
Take form.years
Trim it
get the length of it
replace all numbers with blanks
check to see if the result is numeric
#1 - I would trim form.years only once.. not every time you use it.
If you're using CFMX 7, just is isValid():
<cfset form.years = trim(form.years)>
<cfif len(form.years) and not isValid("integer",form.years)>
rick
> --
> Join the Open Source Coldfusion NCAA Pool for a chance to win a 2 gig USB
> flash drive!
> http://www.opensourcecf.com/forums/ncaapool.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272749
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4