Validation Regexes
Introduction to Validation Regexes
To ensure data consistency and compliance, we are implementing stricter validation rules for certain fields within our API. This involves restricting the character sets allowed for specific objects, as detailed below.
First/middle/last name for Individual End User
first name
^[a-zA-Z](?:[a-zA-Z '.-]*[a-zA-Z])?\.?$
last name
^'?[a-zA-Z]([ a-zA-Z'-]*[a-zA-Z])?$
middle name
^[a-zA-Z](?:[a-zA-Z '.-]*[a-zA-Z])?\.?$
Address for Individual and Business End User
address line1 (the same for line2)
^[a-zA-Z0-9 .'\-/,)(⁰°#"]*[a-zA-Z0-9]+[a-zA-Z0-9 .'\-/,)(⁰°#"]*$
city
^[a-zA-Z0-9 .'\-/,]*[a-zA-Z0-9]+[a-zA-Z0-9 .'\-/,]*$
state
^[a-zA-Z0-9 .'\-/,)(+]*[a-zA-Z0-9]+[a-zA-Z0-9 .'\-/,)(+]*$
postal code (for Countries NOT in (BG, EE, IE))
^[a-zA-Z\d][a-zA-Z\s\d\-]{1,8}[[a-zA-Z]\d]$
Registration/trading address for Business End User regex is the same as for regular address.
Company/trading name for Business End User
[a-zA-Z0-9\s',£€¥'':/«»"".?\-+()]+
Payee name:
^[ a-zA-Z0-9.'\-/&]+$
Important: Failure to adhere to these validation rules may result in issues during account creation.
Summary of the Differences between End User Names Regexes and Payee Name Regex
Feature | End User Name Regexes | Payee Name Regex |
---|---|---|
Starting Character | Must start with a letter (except last name) | Can start with space, letter, digit, or allowed character |
Ending Character | Must end with a letter (optional period allowed) | Can end with any allowed character |
Allowed Characters | space, apostrophe, period, hyphen, letters | space, letters, digits, period, apostrophe, hyphen, /, , & |
Digits | Not allowed | Allowed |
Forward slash | Not allowed | Allowed |
Ampersand | Not allowed | Allowed |
Optional Starting Char | Last name allows optional apostrophe at the beginning | Not applicable |
Updated 5 days ago