After you strip out the $ and/or commas, use IsNumeric() to make sure users enter nothing but numeric.
I think that should do it. -----Original Message----- From: Ed Gordon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 10:04 AM To: CF-Talk Subject: simple test on text field for numeric only ? I think I know there is no way but to write my own routine, but if I do, maybe someone has done it before... How can I check to see if a text form field contains anything other than numbers? CFINPUT/VALIDATE won't do, here's why: This system deals with a lot of big dollar amounts - $3,500,000.00 - etc - So to improve readability on editing them, I put them in the VALUE=#dollarFormat(var)# of the CFINPUT, but whether they change them or not, when they process the CFFORM, it would cause an error if the field was type=float or integer... So, I made them type=text and parse out the $ and/or commas in a loop myself. But if they "oops" and put $3,5T0,000 or OH instead of zero or whatever, they would get the ODBC ERROR "tombstone" error page. Is there a simple test to see if a text field will go into the database in a numeric field, so I can loop back with a message to the user (as I already do for other purposes)? FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

