>Why would you pass a /string/ that's not nine digits? ;-) We store SSN/ID Numbers in numeric fields (like it or not). The leading zeros are stripped when stored in those fields. I think your next comment has a very good point... >In this particular case, I don't think that's a good idea. If I asked you for your social security number, I would expect "Double oh five, ninetey-eight, twenty sixteen," not "five millions, nine hundred and eight two thousand, and sixteen." A SSN is a series of digits, not a number. I wouldn't accept anything other than nine digits (and maybe some hyphens and/or other non-digit characters) as valid. However, if we're talking about salary instead of SSN I would think padding with zeros is perfectly reasonable.
This is the best clarification. You are right in that a SSN is not a number on which you would perform calculations. It is a string of digit characters that may, or may not, begin with a zero. >I think having the function verify its input is reasonable if there's a realistic possiblity of the function being called with invalid input. >Of course, that's assuming that throwing an exception is the appropriate thing to do in the case of invalid input. But depending on your requirements you may want to input all 9s (like they do in NC when illegal aliens apply for drivers liceneses.) On our current business system, SSNs are our unique identifier. If we have a foreign student, we will generate a "fake" SSN for them. This is used until the student needs to get a real SSN. (I know, I know. This whole process sucks. We are moving to a new system that doesn't have this problem.) Therefore, I can't really validate if the SSN is a valid SSN as far as the govt is concerned. I can only validate if the number is nine digits in a row. Thanks for the very-detailed reply. M!ke ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at [EMAIL PROTECTED]
