> I would trim form.years only once... This is a jQuery Ajax validation, and the form field validates "onblur" every time after the field is focused.
> cfset form.years... I don't want to actually change for the form data... I want to return it to them as they entered it. > If you're using CFMX 7... Ha! You don't realize you're talking to a luddite here... Still on CF 4.5! Rick -----Original Message----- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 3:46 PM To: CF-Talk Subject: Re: Need some help with this Regex... 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272756 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

