Even when the number is localized by the first numbers, the number is not based on birth locals, it is based on 'issued' locals. People can receive their ssn at any age and any location. Plus, don't forget, validating against a pattern of 3-2-4 won't account for TINs with a pattern of 2-7.
William Seiter (mobile) Have you ever read a book that changed your life? go to: http://www.winninginthemargins.com and use passcode: GoldenGrove -----Original Message----- From: "Bobby Hartsfield" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: 5/15/2008 7:17 AM Subject: RE: SSN Since the 70's, the first section of the number has been based on zipcodes where issued but before that it represented general location such as west/east coast and even the SSN office numbers so it's not too reliable just yet since there are plenty of both still floating around :-/ There are other things that you could validate though. They wouldn't necessarily mean the number was an actual valid SSN that is actually in use somewhere... just closer to being one. - None of the sections can be all 0's - There are some reserved numbers but I don't recall what they are. Think they may start with 999 or something. Im sure google knows. - I've heard that 666 cannot be in an SSN. Ive never seen one with it but don't know that it's actually true A basic check would consist of: <cfset SSNNUMBER = "555-55-5555" /> <cfset strippedSSN = rereplace(ssnNumber, '[^0-9]', '', 'all') /> - Make sure the stripped ssn is 9 numbers <cfset isNineNums = len(strippedSSN) is 9 /> - Make sure that none of the 3 sections is 0 <cfset ssnArea = left(strippedSSN, 3) /> <cfset ssnGroup = mid(strippedSSN, 4, 2) /> <cfset ssnSerial = right(strippedSSN, 4) /> <cfset invalidZeros = val(ssnArea) is 0 or val(ssnGroup) is 0 or val(ssnSerial) is 0 /> - And if you believe the 666 tale... <cfset isBeastySSN = find(666, ssnnumber) /> - Check them all for a final result <cfset validSSN = not invalidZeros and isNineNums and not isBeastySSN /> <cfdump var="#variables#" /> Other than finding the reserved numbers and filtering those, I think that is the best you can do for now. ....:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -----Original Message----- From: Greg Edmonds [mailto:[EMAIL PROTECTED] Sent: Thursday, May 15, 2008 8:06 AM To: CF-Talk Subject: SSN Hello All, I know there are many ways to validate a US social security number, but is there any way to verify that it is actually a real ssn number? For example, the current validation used for cfinput would return 111-11-1111 as a valid ssn. I guess it could be valid, but I don't think it is. I need something that would verify if this is an ACTUAL ssn. Kind of like we do for credit cards. Any ideas? Thanks! Greg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305355 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4