I think what you're looking for might be
^\d{4}-\d{3}-\d{4}$
but, to be honest, I've not done much with JS regexes.As always, check out the RegEx list at http://www.houseoffusion.com for more help. Many regex ninjas on call there. :-) -- Ben Doom Programmer & General Lackey Moonbow Software, Inc : -----Original Message----- : From: Gerry Pauline [mailto:[EMAIL PROTECTED]] : Sent: Monday, January 27, 2003 2:39 PM : To: CF-Talk : Subject: CFINPUT & RegExp : : : 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 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

