> Is there a way to drop the dashes (-) when validating for > SSN? The SSN in the database don't have them. > > <cfinput type="text" name="ssn" maxlength="9" size="28" > validate="social_security_number" validateat="onsubmit" > class="formveld">
Here's the regex that CF uses for client-side SSN validation: /^[0-9]{3}(-| )[0-9]{2}(-| )[0-9]{4}$/ I found it in /CFIDE/cfform.js. It looks to me like this expression looks for dashes or spaces, but requires one or the other. There are a couple of approaches you could take. I think that I'd just strip the dashes from the value in your action page. If that's not acceptable to you, you could use your own regular expression instead of theirs, or you could write your own validation routine. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269186 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4