Skip to content

rtn

Validates a US RTN (Routing Transit Number) used to identify financial institutions.

Options

OptionTypeDefaultDescription
messagestringlocale defaultCustom error message

Playground

Valid values

ValueNotes
"021000021"JPMorgan Chase routing number
"011000138"Bank of America routing number

Invalid values

ValueReason
"021000022"Fails weighted checksum
"12345678"Only 8 digits instead of 9

Notes

  • Empty string ("") always returns valid: true. Combine with notEmpty to require a value.
  • RTN is exactly 9 digits. Validated using a weighted checksum (mod 10).

Released under the MIT License.