Finance & Banking
Battle-tested patterns for financial data validation. Ensure your payment flows and banking integrations handle international formats, IBANs, and credit card numbers correctly.
ISO 4217 Currency Code
Matches a 3-letter ISO 4217 currency code.
Decimal Monetary Amount
Matches a monetary amount with up to 2 decimal places and optional thousands separators.
Monetary Amount with Currency Code
Matches a monetary amount prefixed or suffixed with an ISO 4217 currency code.
Accounting Format (Negative in Parentheses)
Matches a monetary amount in accounting format: positive as plain number, negative in parentheses.
Percentage Value
Matches a percentage value with optional decimal places and optional percent sign.
Basis Points (bps)
Matches a basis points value: integer or decimal, typically 0–10000 (0% to 100%).
Forex Currency Pair
Matches a foreign exchange currency pair in the standard BASE/QUOTE or BASEQUOTE format.
Price/Quote with Tick Size
Matches a financial price with up to 8 decimal places (for crypto) or standard 4 for FX.
Large Number with Thousands Separator
Matches a large positive integer with comma thousands separators (no decimals).
Interest Rate (APR / APY)
Matches an interest rate as a percentage, allowing values above 100% for comparison/display.
IBAN (Generic, All Countries)
Matches an IBAN (International Bank Account Number) in any country format: country code, 2 check digits, up to 30 alphanumeric chars.
IBAN (UK — GB)
Matches a UK IBAN: GB + 2 check digits + 4-char bank code + 6-digit sort code + 8-digit account number.
IBAN (Germany — DE)
Matches a German IBAN: DE + 2 check digits + 8-digit bank code (BLZ) + 10-digit account number.
SWIFT / BIC Code
Matches a SWIFT Business Identifier Code (BIC): 8 or 11 alphanumeric characters.
US ACH/ABA Routing Number
Matches a US ABA routing transit number (RTN): exactly 9 digits, with structural digit constraint.
UK Sort Code
Matches a UK bank sort code: 6 digits optionally formatted as XX-XX-XX.
Australian BSB (Bank-State-Branch)
Matches an Australian BSB number: 6 digits optionally formatted as XXX-XXX.
Indian IFSC Code
Matches an Indian Financial System Code (IFSC): 4-char bank code + 0 + 6-char branch code.
SEPA Creditor Identifier (CI)
Matches a SEPA Creditor Identifier used for direct debit mandates.
Singapore Bank Account Number
Matches a Singapore bank account number (DBS, OCBC, UOB, MAS format).
Canadian Transit Number
Matches a Canadian bank transit number: 5-digit branch + 3-digit institution number.
New Zealand Bank Account Number
Matches a New Zealand bank account in XX-XXXX-XXXXXXX-XXX format.
Generic Payment Card Number (13–19 digits)
Matches a payment card number with 13 to 19 digits, with optional spaces or hyphens as group separators.
Visa Card Number
Matches a Visa card number: starts with 4, 13 or 16 digits.
Mastercard Number
Matches a Mastercard number: starts with 51-55 or 2221-2720, exactly 16 digits.
American Express Card Number
Matches an American Express card number: starts with 34 or 37, exactly 15 digits.
Discover Card Number
Matches a Discover card number: starts with 6011, 622126-622925, 644-649, or 65. Exactly 16 digits.
Card Expiry Date (MM/YY or MM/YYYY)
Matches a credit/debit card expiry date in MM/YY or MM/YYYY format.
CVV / CVC / Security Code
Matches a card security code: 3 digits (Visa/Mastercard/Discover) or 4 digits (Amex).
Masked Card Number (PAN Masking)
Matches a masked card number showing only the last 4 digits, with the rest replaced by X or *.
US Social Security Number (SSN)
Matches a US Social Security Number in XXX-XX-XXXX format, excluding invalid ranges.
US Employer Identification Number (EIN)
Matches a US EIN (Federal Tax ID) in XX-XXXXXXX format.
UK National Insurance Number
Matches a UK National Insurance (NI) number: two prefix letters, 6 digits, and a suffix letter A-D.
EU VAT Number (Generic)
Matches an EU VAT number with country prefix and country-specific format.
Australian Business Number (ABN)
Matches an Australian Business Number: 11 digits, optionally formatted as XX XXX XXX XXX.
Indian GSTIN (GST Identification Number)
Matches an Indian Goods and Services Tax Identification Number (GSTIN).
Singapore UEN (Unique Entity Number)
Matches a Singapore UEN: 9-10 digits for businesses, or specific formats for local companies, foreign companies, and government entities.
UK UTR (Unique Taxpayer Reference)
Matches a UK Unique Taxpayer Reference: exactly 10 digits.
Canadian Business Number (BN)
Matches a Canadian CRA Business Number: 9-digit root, optionally with 2-letter program identifier and 4-digit reference.
Legal Entity Identifier (LEI)
Matches a Legal Entity Identifier: 20 alphanumeric characters (ISO 17442).
ISIN (International Securities Identification Number)
Matches an ISIN: 2-letter country code + 9 alphanumeric chars + 1 check digit.
CUSIP
Matches a CUSIP (Committee on Uniform Security Identification Procedures): 9 alphanumeric characters.
SEDOL
Matches a SEDOL (Stock Exchange Daily Official List): 6 alphanumeric chars + 1 check digit.
US Stock Ticker Symbol
Matches a US stock ticker symbol: 1-5 uppercase letters, with optional class share suffix.
Options Contract Symbol (OCC Format)
Matches an OCC standardized options contract symbol: underlying + expiry date + C/P + strike price.
Futures Contract Symbol
Matches a CME-style futures contract symbol: root symbol + month code + 2-digit year.
Bloomberg Ticker
Matches a Bloomberg ticker with exchange suffix: TICKER EXCHANGE or TICKER:EXCHANGE.
Reuters Instrument Code (RIC)
Matches a Reuters/Refinitiv Instrument Code (RIC): ticker with optional exchange and chain codes.
FIGI (Financial Instrument Global Identifier)
Matches a Financial Instrument Global Identifier (FIGI / Bloomberg Global ID): 12 alphanumeric characters.
Market Identifier Code (MIC)
Matches an ISO 10383 Market Identifier Code: exactly 4 uppercase alphabetic characters.
CFI Code (Classification of Financial Instruments)
Matches an ISO 10962 CFI code: exactly 6 uppercase alphabetic characters.
FIX Protocol Tag=Value Pair
Matches a FIX protocol message field in tag=value format.
Bitcoin Address (Legacy P2PKH — starts with 1)
Matches a Bitcoin Legacy Pay-to-Public-Key-Hash (P2PKH) address starting with 1.
Bitcoin Address (P2SH — starts with 3)
Matches a Bitcoin Pay-to-Script-Hash (P2SH) address starting with 3, used for multisig and SegWit compatibility.
Bitcoin Bech32 Address (Native SegWit — bc1)
Matches a Bitcoin Bech32 native SegWit address starting with bc1.
Ethereum Address
Matches an Ethereum address: 0x prefix followed by exactly 40 hexadecimal characters.
Ethereum Checksummed Address (EIP-55)
Matches an Ethereum EIP-55 checksummed address with correct mixed-case format.
Solana Wallet Address
Matches a Solana wallet address: Base58-encoded 32-byte public key (43-44 characters).
Crypto Transaction Hash (Generic)
Matches a cryptocurrency transaction hash: 0x-prefixed 64-hex (Ethereum/EVM) or plain 64-hex (Bitcoin).
HD Wallet Derivation Path (BIP-32 / BIP-44)
Matches a BIP-32/BIP-44 hierarchical deterministic wallet derivation path.
Invoice Number
Matches a common invoice number format: optional prefix, numeric or alphanumeric identifier.
Accounting Period (YYYY-MM)
Matches a financial accounting period in YYYY-MM format.
Financial Year (FY2024 / FY2024-25)
Matches a financial year label in FY2024 or FY2024-25 format.
Trade Settlement Date (T+N)
Matches a trade settlement convention: T+0, T+1, T+2, T+3 etc.
SWIFT Message Type
Matches a SWIFT message type (MTxxx format) used in interbank messaging.
ISO 20022 Message Type
Matches an ISO 20022 (MX) message type identifier.
General Ledger Account Code
Matches a chart of accounts GL code: 4-8 digit account number, optionally with department suffix.
IBAN-Formatted Account Display
Matches an IBAN formatted with spaces for display (groups of 4 characters).
Payment Reference (End-to-End ID)
Matches a payment end-to-end reference as used in SEPA and ISO 20022 payments: alphanumeric, up to 35 characters.
Lot Size / Quantity (Financial)
Matches a financial instrument lot size or quantity: positive integer or decimal with up to 8 places.