United States Banking Institution Account Number Regular Expression?

前端 未结 8 1737
星月不相逢
星月不相逢 2020-12-29 18:25

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 reser

8条回答
  •  渐次进展
    2020-12-29 19:14

    In Addition to the other great answers here, i think its helpful to know that routing numbers in the United States include a checksum digit which can be helpful for quick validation that the user typed it in correctly

    http://www.brainjar.com/js/validation/

    basically all US routing numbers should pass the following test:

    3 * (digits[0] + digits[3] + digits[6]) +
    7 * (digits[1] + digits[4] + digits[7]) +
    (digits[2] + digits[5] + digits[8]) % 10 === 0
    

提交回复
热议问题