I have a form field that should contain a number only. How can validate so that is doesn't take letters.
For example I dont want it s accept aydhasdsiFGGS when I submit the form.

  <CFIF (find([A-Z],Telephone)) gte "1">
      <CFLOCATION URL="error.cfm?PassedError=Possible%Spam.">
    <CFABORT>
</CFIF>

Please help

Try a regular expression like ReFind("[^\d]", form.theFieldName)

If the value's required, check the LEN(...) too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.