CFxperts:

I'm using CFFORM to create an online survey for a user. In one of the
CFINPUT tags, I'm using a regular express to validate an entry. I coded
the VALIDATE= and PATTERN= parms as follows:

 <CFINPUT type="text" 
         SIZE="40" 
    MAXLENGTH="13" 
     VALIDATE="regular_expression" 
      PATTERN="/^\d{4}\-\d{3}\-\d{4}$/"
         NAME="BudgetNo" 
     REQUIRED="Yes" 
      MESSAGE="Please enter your BUDGET NUMBER !">      

The text should contain three numeric quadrants delimited by hyphens,
for example: 1000-909-1033. As you may guess, it doesn't seem to be
working. According to the manual, a JavaScript regular expression should
be used, which I believe is specified correctly.

The CFFORM tag is coded as follows:

<CFFORM NAME="TAsurvey" 
      METHOD="POST" 
      ACTION="TASurveyToDB.CFM" 
    ONSUBMIT="return chkForm()">

As you can see, it calls another JS function in addition to using the
builtin valadation features of the CFINPUT tag. The other tags using the
CFINPUT validation calls all work OK (only the tag above uses a regular
expression).

Could someone please advise me on what I'm doing wrong (besides being
lazy and using CFFORM in the first place !). Any and all
advise/suggestions/help will be gratefully appreciated !

Thank you.

-Gerry

Gerard T. Pauline
Mgr, Internet Applications
Computer Systems, DoIT
Pace University
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to