ID Number Regex
Validate the ID number format to prevent failed ID lookups due to invalid format
The most common reason for failure of an ID lookup is because the end user did not input their ID number correctly. One of the best ways to mitigate this is to validate ID numbers on the client-side, before sending them to Smile Identity. Below we will provide validation regexes for most of our ID types. It is important to note that they change over time, and we will do our best to keep this page updated.

Know Your Customer (KYC)

Country
Country Code
id_type
Regex
🇬🇭
Ghana
GH
DRIVERS_LICENSE
/^[a-zA-Z0-9]{6,10}$/i
Ghana
GH
PASSPORT
/^(?i)G[a-zA-Z0-9]{7,9}$/i
Ghana
GH
SSNIT
/^[a-zA-Z]{1}[a-zA-Z0-9]{12,14}$/i
Ghana
GH
VOTER_ID
/^[0-9]{10,12}$/
Ghana
GH
NEW_VOTER_ID
/^[0-9]{10,12}$/
🇰🇪
Kenya
KE
ALIEN_CARD
/^[0-9]{6,9}$/
Kenya
KE
NATIONAL_ID
/^[0-9]{1,9}$/
Kenya
KE
PASSPORT
/^[A-Z0-9]{7,9}$/
🇳🇬
Nigeria
NG
BVN
/^[0-9]{11}$/
Nigeria
NG
NIN
/^[0-9]{11}$/
***Nigeria
NG
NIN_SLIP
/^[0-9]{11}$/
Nigeria
NG
DRIVERS_LICENSE
/^[a-zA-Z]{3}([ -]{1})?[A-Z0-9]{6,12}$/i
Nigeria
NG
PHONE_NUMBER
/^[0-9]{11}$/
Nigeria
NG
VOTER_ID
/^[a-zA-Z0-9 ]{9,19}$/i
🇿🇦
South Africa
ZA
NATIONAL_ID
/^[0-9]{13}$/
Copy link