I'm going to be using this regex in a validation plug-in
that works with jQuery.

I've got the plug-in working, I just need to add some additional
validation statements.

Is a JS statement that checks to see if an entry is in US dollars?
That would be the simplest thing to use... because, really, if
a person were to accidentally enter 4$00,000.00 instead of $400,000.00,
then I'd still have a validation problem most likely.  Haven't used JS
like this before, so I'm not sure how code will respond to various
entries.

Rick



-----Original Message-----
From: Dinner [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 10, 2007 4:02 PM
To: CF-Talk
Subject: Re: How to turn this into a REGEX for use in javascript?

You could even put the below in the onchange, so the user knows what's
gonna happen ahead of time.  Assuming the below works. ;-)

On 3/10/07, Peter Boughton wrote:
>
> Odd way of doing things?
>
> I'd switch it to something like this:
> <cfif NOT REFind('[^0-9.$,]', Form.Sale_Price)>
> ....
> </cfif>
>
> Which (I think) can be translated into this JS:
> if (sale_price.match(/[^0-9.$,]/) == false)
> {
> ....
> }
>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272282
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to