Try this:
^[0-9]+$
A string must start (^) with a number ([0-9]), at least one number must exist (+) and 
the string ends after one or more numbers ($).


> Hi,
> The snippet below does check to ensure that a user puts in a digit in a
> form.
> The problem is - if I test this code like adding a letter to the digit
> it does not flag the error.
> I will like to ensure that only digits are allowed and if anyone as much
> as adds a digit after or before -
> an error will be raised! 
> Any bright ideas?
> 
>       <cfif NOT ReFind("[0-9]", form.job_amount,"True")>
> <cfset error_message = "You must enter a number in the
> amount field.">
> <cfset error_fields = ListAppend(error_fields,
> "job_amount")>
> <cfset OK = FALSE>
> </cfif>
> 
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to