views:

1470

answers:

6

I have been tasked to "verify" the length of a U.S. Banking Institution ACCOUNT NUMBER for a web app I'm developing. I cannot find anything through SOF, Google, Fed reserve etc that outlines an account number standard length that we have in the United States. For the record I believe this is futile.

If someone could point me to any official documentation on the web, or has an example regular expression, or knows if there is a standard that exists, I would appreciate it greatly.

ADDED:

What would interest me even more since the response is overwhelming that their is no standard....has anyone ever run into a bank account number that is not completely "numeric"\

ADDED:

Thanks to everyone and their responses. Due to having no standard in the US, we are not going to enforce a length check, and we are going to store the number as a varchar due to the fact that it may be possible that a bank may assign alpha characters in their account numbers. Seems 99.999999% unrealistic in our view, but no standard means we will accept alpha characters and run the check on the account number to verify if it works or not. Thanks again all!

+1  A: 

I don't think there is a standard - different institutions seem to use different lengths of account number. There probably is an upper limit - it is unlikely to be less than 20.

Jonathan Leffler
Thanks...only adding to my intial...i told you so.....hah!
Boom Shaka Laka
+6  A: 

There is no standard for US banks' account numbers.

IBAN is not used in the US.

There is a limit for ACH transactions (4-17 digits), but not all transactions have to be ACH.

And yes, the US banking system is antiquated.

I'm looking at a DW of 38 different systems at a bank and the length of account varies widely depending on the product. Several of the systems have alphabetic characters in the account numbers. This is probably irrelevant since they are special types of customer accounts like brokerage accounts and other things which aren't accessible through ACH - you need to specify what kind of account you're interested in. If you restrict yourself to accounts which you can get to through ACH, you can simply restrict to numeric digits.

You can get a lot more information about ACH at: http://www.nacha.org/

Cade Roux
+1 This is correct. I've personally seen bank account numbers as low as account # 12, so I'm assuming banks are free to start at 1 and go up from there. I'd say a regex just to ensure it is a whole number should work. ^/d{?}$ Or limit it based on the size of the database field you're using as in ^/d{1,15}
David Stratton
It's amazing that yet another international standard (IBAN) is just being totally ignored in the US ..... makes sending money from Europe to the US just such a hassle.....
marc_s
+1  A: 

Don't you mean International Bank Account Number? If yes, this is a regex for IBAN (all IBANs):

[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}

UPDATE: Actually, according to Wikipedia: Banks in the United States do not provide IBAN format account numbers. Any adoption of the IBAN standard by U.S. banks would likely be initiated by ANSI ASC X9, the U.S. financial services standards development organization but to date it has not done so. Hence payments to U.S. bank accounts from outside the U.S. are prone to errors of routing.

Pascal Thivent
+2  A: 

Good luck with that, because you can't.

Banks are free to use just about anything as an account number. I think the only validation you can do is whether or not they're numeric (as they all are).

The most common length for bank account numbers is 9, 12, or 10 digits. Although they range from 4 to 17 digits long. I have a large database of valid numbers and there's no pattern that I can see to the "account number".

A "routing number" defines the bank (pretty much) but even within a particular routing number, the account numbers can be of different lengths.

This is why payroll services often require an extra day (or two) before initiating Direct Deposit in order to "prenote" the account (validate it by performing a no-op ACH transaction) because you really can't verify it otherwise.

clintp
Ah ok, i added this to my post. It would be ok to assume it has to be completely "numeric" you are saying?
Boom Shaka Laka
Every one I've ever seen is numeric, and I've seen them for a few thousand banks. Normally they're printed on the check in MICR which is numeric only (and a few symbols) so I think this is a safe assumption.Of course, this doesn't mean that some bank somewhere isn't using smileys and dingbats as account identifiers. :)
clintp
Agreed. I have never personally seen an non numeric character in an account number, but I cant design this system assuming that all account numbers are numeric. No standards are fun!
Boom Shaka Laka
Kinda like an email address? :-)
Greg Bacon
A: 

There is no standard for a bank account number in the US. There is a standard for the routing number, because that's shared between banks; the account number, however, is only of use internally by the bank itself.

Ken White
A: 

Very interesting. It seems like all routing/transit numbers are 9 digits.

I just checked American Express's online bill pay, for bank accounts they limit their field to 15 numerics. Chase limits theirs to 17. I would probably continue checking and maybe start to call a few banks to find out what their specifications are. It doesn't seem like there is a standard.

Another potential way to determine the length would be to ask the company that performs the transaction. Where does the account number get used? They should have specifications on what they will accept.

Bob