{
  "$schema": "../cases.schema.json",
  "format": 1,
  "domain": "bankAccount",
  "title": {
    "en": "Bank account",
    "pt-BR": "Conta bancária"
  },
  "functions": [
    {
      "id": "bankAccount.isValid",
      "level": "extended",
      "summary": "Validates a Brazilian bank account.",
      "description": "Validates a Brazilian bank account (bank code, agency, account and check digit).\n\n- `bankCode`, `agency` and `account` have every non-digit character removed (`\"1-584\"` and `\"0021.0169\"` are read as digits). `digit` is uppercased and keeps only digits, `P` and `X`. A value that is not an object, or a field that is not a string, makes the account invalid.\n- `params` carries `bankCode` (3 digits), `agency` (1 to 5 digits), `account` (1 to 13 digits) and `digit` (1 or 2 characters, or `X` for Banco do Brasil and `P` for Bradesco), all strings.\n- `bankCode` must be a Banco Central STR participant (the list that `bank.getByCode` uses). The function rejects any other code.\n- Nine banks are checked with a check-digit rule, each with its own agency and account lengths (`digit` is one character):\n  - Banco do Brasil (001): agency 4 to 5 digits, account 8 to 10 digits. Modulus 11 over the account, weights 2 to 9 cycling from the right; a result of 10 gives `X`.\n  - Santander (033): agency 4 digits, account 8 digits. Over agency + `00` + account, weights `9,7,3,1,0,0,9,7,1,3,1,9,7,3`, keeping only the units digit of each product; the digit is (10 - sum mod 10) mod 10.\n  - Banrisul (041): agency 4 digits, account 9 digits (tipo 2 digits + conta 7 digits). Weights `3,2,4,7,6,5,4,3,2` over the account, modulus 11; remainder 0 gives `0`, remainder 1 gives `6`, otherwise 11 minus the remainder.\n  - Caixa (104): agency 4 digits, account 11 or 12 digits. See below.\n  - Bradesco (237): agency 4 digits, account 7 digits. Modulus 11 over the account, weights 2 to 7 cycling from the right; a result of 10 gives `P`.\n  - Nubank (260): agency 4 digits, account 5 to 13 digits. Verhoeff digit over the account with leading zeros dropped.\n  - Itaú (341): agency 4 digits, account 5 digits. Modulus 10 over agency + account.\n  - HSBC/Kirton (399): agency 4 digits, account 6 digits. Weights `8,9,2,3,4,5,6,7,8,9` over agency + account, modulus 11; remainder 10 gives `0`.\n  - Citibank (745): agency 4 digits, account 10 digits. Weights `11,10,9,8,7,6,5,4,3,2` over the account, modulus 11; remainder 0 or 1 gives `0`, otherwise 11 minus the remainder.\n- No act of the Banco Central, of another government body or of FEBRABAN sets these rules. The FEBRABAN CNAB 240 layout (v11.0, notes G009 to G012) calls each check digit a \"código adotado pelo Banco\" and gives no algorithm.\n- Official source (the bank's own layout manual): Caixa (both digits, CNAB 400 notes NE051/NE052 and CNAB 240 note G011), Santander (the account digit, Débito Automático 150 positions v08, April 2026) and Banco do Brasil (the agency digit, Doc5175 Anexo XI; the manual only calls the account digit \"módulo 11\", which matches the rule here). The rules here match their worked examples.\n- Third-party compendium: the other rules (Banrisul, Bradesco, Itaú, HSBC/Kirton, Citibank and the Caixa 11-digit form) follow the Icatu Seguros compendium \"Regras de Validação de dígito verificador de agência e conta corrente\", a private compilation. Nubank publishes no rule; its Verhoeff digit comes from open-source validators that derived it from real accounts.\n- Caixa (104): the agency has 4 digits and the digit is 1 character. A 12-digit account (the \"sem operação\" form of the Caixa layouts) accepts either of the two Caixa digits: the account digit over the 12 digits (official example: 000000109990 gives 6) or the agency/account digit (0161 + 000000109990 gives 5). Both are modulus 11 with weights 2 to 9 from the right, a result above 9 giving 0. The older 11-digit form, operação (3 digits) + conta (8 digits), keeps the compendium's agency/account rule. 2.4.0 rejected a 12-digit Caixa account.\n- These banks are checked by structure only, because no check-digit rule of theirs is known: Inter (077), Ailos (085), XP (102), Unicred (136), Stone (197), BTG Pactual (208), Original (212), PagBank (290), BMG (318), Mercado Pago (323), C6 (336), PicPay (380), Cora (403), Pan (623), BV (655), Daycoval (707), Sicredi (748) and Sicoob (756). Agency (1 to 5 digits) and account (1 to 13 digits) only need to fit their lengths, and a single numeric `digit` is enough (`X` and `P` are not accepted).\n- Every other listed bank uses a generic fallback: a 1-character `digit` must equal the mod 10, the boleto mod 11 or the bank mod 11 of the account, so up to three of the ten digits pass for a given account. A 2-character digit chains mod 10 then mod 11. No published rule backs the fallback: `true` for a bank outside the lists above says the structure is plausible, not that the check digit is proven.\n- For Banco do Brasil the agency digit is not checked. A 5-digit agency (`1584-9`) is only held to the length, whatever its last digit is.",
      "params": [
        {
          "name": "params",
          "type": "IsValidBankAccountParams"
        }
      ],
      "returns": "boolean",
      "cases": [
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "",
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when bankCode is an empty string"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when agency is an empty string"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when account is an empty string"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "12345678",
              "digit": ""
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when digit is an empty string"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":null,\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": null,
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when bankCode is null"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":123,\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": 123,
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when bankCode is not a string"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"12\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "12",
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when bankCode length is not 3"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"1234\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "1234",
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when bankCode length is not 3"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"123456\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "123456",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when agency length is greater than 5"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"12345678901234\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "12345678901234",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when account length is greater than 13"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"123\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "12345678",
              "digit": "123"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when digit length is greater than 2"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"00a\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "00a",
              "agency": "1234",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when contains non-digit characters"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"12a4\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "12a4",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when contains non-digit characters"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"abc\",\"agency\":\"def\",\"account\":\"ghi\",\"digit\":\"j\"}]",
          "args": [
            {
              "bankCode": "abc",
              "agency": "def",
              "account": "ghi",
              "digit": "j"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when all characters are non-digit (empty after sanitization)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"abc\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "abc",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when all characters are non-digit (empty after sanitization)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"abc\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "abc",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false when all characters are non-digit (empty after sanitization)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"123\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "123",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Banco do Brasil (001) when agency length is less than 4"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"1234567\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "1234567",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Banco do Brasil (001) when account length is less than 8"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"12345678901\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "12345678901",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Banco do Brasil (001) when account length is greater than 10"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"12\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "12345678",
              "digit": "12"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Banco do Brasil (001) when digit length is not 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"123\",\"account\":\"12345\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "123",
              "account": "12345",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Itaú (341) when agency length is not 4"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"1234\",\"account\":\"1234\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "1234",
              "account": "1234",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Itaú (341) when account length is not 5"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"1234\",\"account\":\"12345\",\"digit\":\"12\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "1234",
              "account": "12345",
              "digit": "12"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Itaú (341) when digit length is not 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"123\",\"account\":\"1234567\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "123",
              "account": "1234567",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Bradesco (237) when agency length is not 4"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "123456",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Bradesco (237) when account length is not 7"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"1234567\",\"digit\":\"12\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "1234567",
              "digit": "12"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Bradesco (237) when digit length is not 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"123\",\"account\":\"12345678\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "123",
              "account": "12345678",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Santander (033) when agency length is not 4"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"1234\",\"account\":\"1234567\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "1234",
              "account": "1234567",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Santander (033) when account length is not 8"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"1234\",\"account\":\"12345678\",\"digit\":\"12\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "1234",
              "account": "12345678",
              "digit": "12"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Santander (033) when digit length is not 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"123\",\"account\":\"00123456789\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "123",
              "account": "00123456789",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Caixa (104) when agency length is not 4"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"1234\",\"account\":\"1234567890\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "1234",
              "account": "1234567890",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Caixa (104) when account length is not 11 or 12"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"1234\",\"account\":\"00123456789\",\"digit\":\"12\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "1234",
              "account": "00123456789",
              "digit": "12"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return false Caixa (104) when digit length is not 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for valid inputs with generic validation when the digit matches mod10 (mod10(\"123456\") = 6)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true for valid inputs with generic validation when the digit matches mod11 (mod11(\"123456\") = 1)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"123-4\",\"account\":\"123.456-78\",\"digit\":\"2\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "123-4",
              "account": "123.456-78",
              "digit": "2"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true when inputs contain formatting characters should sanitize and validate"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1584\",\"account\":\"00210169\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1584",
              "account": "00210169",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when account 00210169 has the correct check digit 6 (sum 60, remainder 5, 11 - 5 = 6)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"5892\",\"account\":\"00020394\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "5892",
              "account": "00020394",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when account 00020394 has the correct check digit 7 (sum 59, remainder 4, 11 - 4 = 7)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"7138\",\"account\":\"00189062\",\"digit\":\"X\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "7138",
              "account": "00189062",
              "digit": "X"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when the check digit is X for account 00189062 (sum 122, remainder 1, 11 - 1 = 10 -> X) and false when the digit is 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"7138\",\"account\":\"00189062\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "7138",
              "account": "00189062",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when the check digit is X for account 00189062 (sum 122, remainder 1, 11 - 1 = 10 -> X) and false when the digit is 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"10089939\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "10089939",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when the check digit is 0 for account 10089939 (sum 165, remainder 0), unlike the boleto variant which maps remainder 0 to 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1234\",\"account\":\"10089939\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1234",
              "account": "10089939",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return true Banco do Brasil (001) when the check digit is 0 for account 10089939 (sum 165, remainder 0), unlike the boleto variant which maps remainder 0 to 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"2545\",\"account\":\"02366\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "2545",
              "account": "02366",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Itaú (341) when the account check digit is correct (agency 2545 + account 02366, mod10 sum 39, remainder 9, 10 - 9 = 1)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"1874\",\"account\":\"10009\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "1874",
              "account": "10009",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Itaú (341) when the check digit is 0 for agency 1874 + account 10009 (sum 30, remainder 0)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0238069\",\"digit\":\"2\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0238069",
              "digit": "2"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when account 0238069 has the correct check digit 2 (mod11 sum 108, remainder 9, 11 - 9 = 2)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0284025\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0284025",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when account 0284025 has the correct check digit 1 (sum 98, remainder 10, 11 - 10 = 1)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0325620\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0325620",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when the check digit is 0 for account 0325620 (sum 88, remainder 0)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0301357\",\"digit\":\"P\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0301357",
              "digit": "P"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when the check digit is P for account 0301357 (sum 67, remainder 1), which is the only digit accepted for that remainder"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0301357\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0301357",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when the check digit is P for account 0301357 (sum 67, remainder 1), which is the only digit accepted for that remainder"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"0301357\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "0301357",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return true Bradesco (237) when the check digit is P for account 0301357 (sum 67, remainder 1), which is the only digit accepted for that remainder"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"0189\",\"account\":\"01017417\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "0189",
              "account": "01017417",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Santander (033) when the account check digit is correct (agency 0189 + account 01017417, weighted sum with tens discarded is 51, remainder 1, 10 - 1 = 9)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"3414\",\"account\":\"01092006\",\"digit\":\"4\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "3414",
              "account": "01092006",
              "digit": "4"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Santander (033) when agency 3414 + account 01092006 has the correct check digit 4 (sum 46, remainder 6, 10 - 6 = 4)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0647\",\"account\":\"00188888888\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0647",
              "account": "00188888888",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Caixa (104) when the account check digit is correct (agency 0647 + account 00188888888, weighted sum 455, x10 = 4550, remainder 7)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"2004\",\"account\":\"00100000448\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "2004",
              "account": "00100000448",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Caixa (104) when agency 2004 + account 00100000448 has the correct check digit 6 (sum 82, x10 = 820, remainder 6)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0000\",\"account\":\"00000000006\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0000",
              "account": "00000000006",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true Caixa (104) when the calculated digit is the exceptional 10 for account 00000000006 (bank variant mod11 remainder 1), rendered as 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"60\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "60"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true generic validation with a two digit check when the digit matches mod10 followed by mod11 (mod10(\"123456\") = 6, mod11 over \"1234566\" sum 121, remainder 0) and false for a wrong second digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"66\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "66"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: should return true generic validation with a two digit check when the digit matches mod10 followed by mod11 (mod10(\"123456\") = 6, mod11 over \"1234566\" sum 121, remainder 0) and false for a wrong second digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"000016\",\"digit\":\"60\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "000016",
              "digit": "60"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true generic validation with a two digit check when the second digit is the exceptional 10 (mod10(\"000016\") = 6, bank variant mod11 over \"0000166\" has remainder 1), rendered as 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"000014\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "000014",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: should return true generic validation with a two digit check when only the bank variant of mod11 matches (mod10 and the boleto variant of mod11 both give 1 for \"000014\", but the bank variant gives 0)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"999\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "999",
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: bank code registry should return false when the bank code is not in the Banco Central STR participants list"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"998\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "998",
              "agency": "1234",
              "account": "123456",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: bank code registry should return false for another unassigned bank code that would otherwise pass the generic check"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"2664\",\"account\":\"358507670\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "2664",
              "account": "358507670",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Banrisul (041) should return true for agency 2664 and account 35.850767.0-6 (banktools-br banrisul/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"1234\",\"account\":\"358507671\",\"digit\":\"8\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "1234",
              "account": "358507671",
              "digit": "8"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Banrisul (041) should return true for agency 1234 and account 358507671-8 (daniel-dia/br-bank-account-validator banrisul_validator.spec.ts)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"2664\",\"account\":\"358507670\",\"digit\":\"3\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "2664",
              "account": "358507670",
              "digit": "3"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Banrisul (041) should return false for account 35.850767.0-3 (banktools-br banrisul/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"1234\",\"account\":\"358507671\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "1234",
              "account": "358507671",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Banrisul (041) should return false for account 358507671-0 (daniel-dia/br-bank-account-validator banrisul_validator.spec.ts invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"1234\",\"account\":\"100000004\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "1234",
              "account": "100000004",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Banrisul (041) should return true when the weighted sum is a multiple of 11, where the digit is 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"1234\",\"account\":\"35850767\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "1234",
              "account": "35850767",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Banrisul (041) should return false when the account does not have 9 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"266\",\"account\":\"358507670\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "266",
              "account": "358507670",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Banrisul (041) should return false when the agency does not have 4 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"041\",\"agency\":\"2664\",\"account\":\"358507670\",\"digit\":\"60\"}]",
          "args": [
            {
              "bankCode": "041",
              "agency": "2664",
              "account": "358507670",
              "digit": "60"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Banrisul (041) should return false when the digit has 2 characters"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"0007\",\"account\":\"853838\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "0007",
              "account": "853838",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return true for agency 0007 and account 853838-6 (Icatu compendium example, also banktools-br hsbc/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"1996\",\"account\":\"498991\",\"digit\":\"4\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "1996",
              "account": "498991",
              "digit": "4"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return true for agency 1996 and account 498991-4 (banktools-br hsbc/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"1913\",\"account\":\"104012\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "1913",
              "account": "104012",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return true for agency 1913 and account 104012-0 (banktools-br hsbc/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"0007\",\"account\":\"853838\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "0007",
              "account": "853838",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return false for agency 0007 and account 853838-7 (banktools-br hsbc/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"1996\",\"account\":\"498991\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "1996",
              "account": "498991",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return false for agency 1996 and account 498991-5 (banktools-br hsbc/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"0000\",\"account\":\"000006\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "0000",
              "account": "000006",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return true when the remainder is 10, where the digit is 0"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"399\",\"agency\":\"0007\",\"account\":\"85383\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "399",
              "agency": "0007",
              "account": "85383",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: HSBC / Kirton Bank (399) should return false when the account does not have 6 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0075\",\"account\":\"0007500465\",\"digit\":\"8\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0075",
              "account": "0007500465",
              "digit": "8"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Citibank (745) should return true for agency 0075 and account 0007500465-8 (Icatu compendium example, also banktools-br citybank/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0001\",\"account\":\"2000967610\",\"digit\":\"4\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0001",
              "account": "2000967610",
              "digit": "4"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Citibank (745) should return true for agency 0001 and account 2000967610-4 (banktools-br citybank/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0062\",\"account\":\"2574827866\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0062",
              "account": "2574827866",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Citibank (745) should return true for agency 0062 and account 2574827866-9 (banktools-br citybank/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0075\",\"account\":\"0007500465\",\"digit\":\"2\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0075",
              "account": "0007500465",
              "digit": "2"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Citibank (745) should return false for agency 0075 and account 0007500465-2 (banktools-br citybank/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0001\",\"account\":\"2000967610\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0001",
              "account": "2000967610",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Citibank (745) should return false for agency 0001 and account 2000967610-1 (banktools-br citybank/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0075\",\"account\":\"1000000000\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0075",
              "account": "1000000000",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Citibank (745) should return true when the remainder is 0 or 1, where the digit is 0 in both cases"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0075\",\"account\":\"1000000006\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0075",
              "account": "1000000006",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Citibank (745) should return true when the remainder is 0 or 1, where the digit is 0 in both cases"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"745\",\"agency\":\"0075\",\"account\":\"007500465\",\"digit\":\"8\"}]",
          "args": [
            {
              "bankCode": "745",
              "agency": "0075",
              "account": "007500465",
              "digit": "8"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Citibank (745) should return false when the account does not have 10 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"5216125\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "5216125",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Nubank (260) should return true for agency 0001 and account 5216125-0 (Xerpa/bran_checker nubank_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"1699629\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "1699629",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Nubank (260) should return true for agency 0001 and account 1699629-9 (Xerpa/bran_checker nubank_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"96805203\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "96805203",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Nubank (260) should return true for the 8 digit account 96805203-6 (Xerpa/bran_checker nubank_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"00076832060\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "00076832060",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Nubank (260) should return true for the zero padded account 00076832060-9, where the leading zeros are dropped (Xerpa/bran_checker nubank_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"5216125\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "5216125",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Nubank (260) should return false for account 5216125-1 (Xerpa/bran_checker nubank_test.exs invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"96805203\",\"digit\":\"3\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "96805203",
              "digit": "3"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Nubank (260) should return false for account 1699629-0 (Xerpa/bran_checker nubank_test.exs invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"001\",\"account\":\"5216125\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "001",
              "account": "5216125",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Nubank (260) should return false when the agency does not have 4 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"260\",\"agency\":\"0001\",\"account\":\"5216\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "260",
              "agency": "0001",
              "account": "5216",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Nubank (260) should return false when the account has less than 5 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: banks validated by structure only should return true for a Banco Inter (077) account that matches the documented format"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"336\",\"agency\":\"0001\",\"account\":\"1792706\",\"digit\":\"4\"}]",
          "args": [
            {
              "bankCode": "336",
              "agency": "0001",
              "account": "1792706",
              "digit": "4"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: banks validated by structure only should return true for a C6 (336) account, which publishes no check digit rule"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"756\",\"agency\":\"3005\",\"account\":\"1234567\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "756",
              "agency": "3005",
              "account": "1234567",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: banks validated by structure only should return true for a Sicoob (756) account with any check digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789\",\"digit\":\"X\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789",
              "digit": "X"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: banks validated by structure only should return false when the check digit is not numeric"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789\",\"digit\":\"01\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789",
              "digit": "01"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: banks validated by structure only should return false when the check digit has 2 characters"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"5725\",\"account\":\"01055025\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "5725",
              "account": "01055025",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return true for Banco do Brasil agency 5725 and account 01055025-9 (banktools-br bb/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"0647\",\"account\":\"01226990\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "0647",
              "account": "01226990",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return false for Banco do Brasil agency 0647 and account 01226990-7 (banktools-br bb/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"3295\",\"account\":\"0284025\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "3295",
              "account": "0284025",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return true for Bradesco agency 3295 and account 0284.025-1 (banktools-br bradesco/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1425\",\"account\":\"0238069\",\"digit\":\"3\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1425",
              "account": "0238069",
              "digit": "3"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return false for Bradesco agency 1425 and account 0238.069-3 (banktools-br bradesco/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"1278\",\"account\":\"00118939153\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "1278",
              "account": "00118939153",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return true for Caixa agency 1278 and account 00118939153-0 (banktools-br caixa_economica/account_spec.rb)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"2933\",\"account\":\"00197787120\",\"digit\":\"2\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "2933",
              "account": "00197787120",
              "digit": "2"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return false for Caixa agency 2933 and account 00197787120-2 (banktools-br caixa_economica/account_spec.rb invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"4313\",\"account\":\"43129\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "4313",
              "account": "43129",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return true for Itau agency 4313 and account 43129-0 (Xerpa/bran_checker itau_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"341\",\"agency\":\"4313\",\"account\":\"43129\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "341",
              "agency": "4313",
              "account": "43129",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return false for Itau agency 4313 and account 43129-9 (Xerpa/bran_checker itau_test.exs invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"0092\",\"account\":\"46535495\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "0092",
              "account": "46535495",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return true for Santander agency 0092 and account 46535495-0 (Xerpa/bran_checker santander_test.exs)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"0060\",\"account\":\"01098486\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "0060",
              "account": "01098486",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: reference vectors of the already supported banks should return false for Santander agency 0060 and account 01098486-1 (Xerpa/bran_checker santander_test.exs invalid digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":246,\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": 246,
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when bankCode is a truthy number that stringifies to a listed code"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":1234,\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": 1234,
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when agency is a truthy number matching a real agency"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":123456,\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": 123456,
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when account is a truthy number matching a real account"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":6}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": 6
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when digit is a truthy number"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"24\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "24",
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the bank code has 2 digits, even one that prefixes a listed code"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"abc\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "abc",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the agency sanitizes to 0 digits for a bank with no agency-specific rule"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"xyz\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "xyz",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the account sanitizes to 0 digits, even though mod10('') would match the digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"12345678901234\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "12345678901234",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the account has 14 digits, even with its real mod10 check digit (mod10 of the 14 digit account is 7)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"12345\",\"account\":\"0238069\",\"digit\":\"2\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "12345",
              "account": "0238069",
              "digit": "2"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the Bradesco agency is longer than its 4 digit rule, even though bradescoDigits ignores the agency"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"237\",\"agency\":\"1234\",\"account\":\"02380695\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "237",
              "agency": "1234",
              "account": "02380695",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the Bradesco account is longer than its 7 digit rule, even with its own real check digit (mod11 bank variant, maxWeight 7, over '02380695' is 9)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"123456\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "123456",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the agency has 6 digits for a bank with no agency-specific rule, even with the correct account check digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"12345\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "12345",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return true when the agency has exactly 5 digits for a bank with no agency-specific rule"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"1234567890123\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "1234567890123",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return true when the account has exactly 13 digits for a bank with no account-specific rule (mod10 of the 13 digit account is 7)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789\",\"digit\":\"px1\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789",
              "digit": "px1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when the check digit has 3 characters that sanitize down to 1, even for a structure-only bank"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789012345\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789012345",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when a structure-only account is longer than 13 digits"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"077\",\"agency\":\"0001\",\"account\":\"123456789\",\"digit\":\"P5\"}]",
          "args": [
            {
              "bankCode": "077",
              "agency": "0001",
              "account": "123456789",
              "digit": "P5"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false when a structure-only digit has 2 characters that sanitize down to 1"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1584\",\"account\":\"00210169\",\"digit\":\"-6\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1584",
              "account": "00210169",
              "digit": "-6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should sanitize a hyphen out of the Banco do Brasil check digit (-6 sanitizes to 6, the correct digit)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"9\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "9"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return false for generic validation when the digit matches neither mod10 nor either mod11 variant (123456 gives 6, 1 and 0)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123457\",\"digit\":\"41\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123457",
              "digit": "41"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: type coercion and structural edge cases should return true for the two digit generic check when the second digit is a plain digit, not 0 or 10 (mod10('123457') = 4, mod11 bank variant over '1234574' = 1)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"030\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "030",
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: COMPE_CODES should reject 030, which only appears as a misaligned substring of the concatenated codes"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"003\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "003",
              "agency": "1234",
              "account": "123456",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: COMPE_CODES should accept 003, which is a listed code at an aligned position"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "from the maintainer briefing, #598. changed in 2.5.0: 2.4.0 rejected a 12-digit Caixa account. JavaScript's own test: Caixa (104) should return true when a 12 digit account carries its own digit, the Caixa CNAB 400 note NE051 example (000000109990, digit 6)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"5\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "5"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "from the maintainer briefing, #598. changed in 2.5.0: 2.4.0 rejected a 12-digit Caixa account. JavaScript's own test: Caixa (104) should return true when a 12 digit account carries the agency/account digit, the Caixa CNAB 400 note NE052 example (0161 + 000000109990, digit 5)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Caixa (104) should return false when a 12 digit account carries neither digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Caixa (104) should return false when a 12 digit account carries neither digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"4\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "4"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Caixa (104) should return false when a 12 digit account carries neither digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"000000109990\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "000000109990",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "JavaScript's own test: Caixa (104) should return false when a 12 digit account carries neither digit"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0000\",\"account\":\"000000000006\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0000",
              "account": "000000000006",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "JavaScript's own test: Caixa (104) should return true when a 12 digit account's digit comes out above 9 it is 0 (account 000000000006: sum 12, remainder 1, 11 - 1 = 10)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"104\",\"agency\":\"0161\",\"account\":\"0000001099900\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "104",
              "agency": "0161",
              "account": "0000001099900",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "Caixa (104): 13 digits is longer than the 12-digit account"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"033\",\"agency\":\"2001\",\"account\":\"01038237\",\"digit\":\"7\"}]",
          "args": [
            {
              "bankCode": "033",
              "agency": "2001",
              "account": "01038237",
              "digit": "7"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "#598: the Santander Débito Automático 150 v08 (April 2026) worked example: agency 2001, account 01038237, digit 7"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"15849\",\"account\":\"00210169\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "15849",
              "account": "00210169",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "Banco do Brasil: the agency digit is not checked, so a 5 digit agency is only held to the length (1584-9); from the JavaScript docs"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"15840\",\"account\":\"00210169\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "15840",
              "account": "00210169",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "Banco do Brasil: the agency digit is not checked, so a 5 digit agency is only held to the length (1584-0); from the JavaScript docs"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"0\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "0"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "the generic fallback accepts the mod 10, the boleto mod 11 and the bank mod 11 digits, so up to three of ten digits pass (here 6, 1 and 0)"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"246\",\"agency\":\"1234\",\"account\":\"123456\",\"digit\":\"3\"}]",
          "args": [
            {
              "bankCode": "246",
              "agency": "1234",
              "account": "123456",
              "digit": "3"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "a digit that none of the three generic checks gives is rejected"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":\"001\",\"agency\":\"1-584\",\"account\":\"0021.0169\",\"digit\":\"6\"}]",
          "args": [
            {
              "bankCode": "001",
              "agency": "1-584",
              "account": "0021.0169",
              "digit": "6"
            }
          ],
          "expect": {
            "returns": true
          },
          "note": "non-digits are removed from agency and account"
        },
        {
          "id": "bankAccount.isValid#[null]",
          "args": [
            null
          ],
          "expect": {
            "returns": false
          },
          "note": "a value that is not an object is invalid"
        },
        {
          "id": "bankAccount.isValid#[{\"bankCode\":1,\"agency\":\"1\",\"account\":\"1\",\"digit\":\"1\"}]",
          "args": [
            {
              "bankCode": 1,
              "agency": "1",
              "account": "1",
              "digit": "1"
            }
          ],
          "expect": {
            "returns": false
          },
          "note": "a field that is not a string makes the account invalid"
        }
      ]
    }
  ]
}
