india-kyc-validators
Service icon

India KYC Validators

version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 24 Jun
 by 
0.0
 (0 ratings)
india-kyc-validators

India KYC Validators

Documentation
1.0.0

Overview

ValidatorValidatesMethod
PANFormat + holder-type ruleRegex + 4th-char check
AadhaarFormat + leading digit + check digitRegex + Verhoeff checksum
GSTINFormat + state code + embedded PAN + check digitRegex + mod-36 checksum
IFSC11-char bank code formatRegex
UPI IDname@handle VPA structureRegex


Every validator follows the same contract:

OutputTypeDescription
IsValidBooleanTrue if the value passes all checks, otherwise False.
MessageTextHuman-readable result — "Valid <type>." on success, or the specific reason it failed.

ValidatePAN

Validates an Indian Permanent Account Number.

Input: PAN (Text) — e.g. ABCPE1234F

Rules checked

PositionRule
LengthExactly 10 characters
Chars 1–5Letters A–Z
Char 4Holder type — one of P C H F A T B L J G
Chars 6–9Digits 0–9
Char 10Letter A–Z

Holder-type codes (char 4): P = Individual, C = Company, H = HUF, F = Firm/LLP, A = AOP, T = Trust, B = BOI, L = Local Authority, J = Artificial Juridical Person, G = Government.

InputIsValidMessage
ABCPE1234FTrueValid PAN.
ABCDE1234FFalseInvalid PAN holder-type character (4th position).
ABC1234FalseInvalid PAN format. Expected AAAAA9999A.

ValidateAadhaar

Validates a 12-digit Aadhaar number, including the Verhoeff check digit.

Input: AadharNumber (Text) — accepts spaces/hyphens, e.g. 2341 2345 6783

Rules checked

RuleDetail
FormatExactly 12 digits (spaces and hyphens auto-stripped)
Leading digitCannot start with 0 or 1 (UIDAI never issues these)
Check digit12th digit verified using the Verhoeff algorithm

The Verhoeff checksum catches all single-digit typos and all adjacent digit-swap errors — the two most common manual entry mistakes.

InputIsValidMessage
234123456783TrueValid Aadhaar.
234123456784FalseAadhaar checksum (Verhoeff) failed.
134123456783FalseAadhaar cannot start with 0 or 1.
12345FalseAadhaar must be exactly 12 digits.

ValidateGSTIN

Validates a 15-character GST Identification Number, including the mod-36 check character.

Input: GSTIN (Text) — e.g. 27AAPFU0939F1ZV

Rules checked

PositionRule
Chars 1–2State code — numeric, in range 01–38
Chars 3–12Embedded PAN structure (AAAAA9999A)
Char 13Entity number — 1–9 or A–Z
Char 14Default Z
Char 15Check character — verified using mod-36 checksum
InputIsValidMessage
27AAPFU0939F1ZVTrueValid GSTIN.
27AAPFU0939F1ZXFalseGSTIN checksum failed.
99AAPFU0939F1ZVFalseInvalid GST state code.

ValidateIFSC

Validates the format of an 11-character bank IFSC code.

Input: IFSC (Text) — e.g. HDFC0001234

Rules checked

PositionRule
Chars 1–4Bank code — letters A–Z
Char 5Reserved — always 0
Chars 6–11Branch code — letters or digits
InputIsValidMessage
HDFC0001234TrueValid IFSC.
HDFC1001234FalseInvalid IFSC format. Expected ABCD0XXXXXX (5th char is zero).

ValidateUPI

Validates the structure of a UPI Virtual Payment Address (VPA).

Input: UPI (Text) — e.g. mohan@oksbi

Rules checked

PartRule
Structureidentifier@handle (exactly one @)
IdentifierLetters, digits, dots, hyphens, underscores
HandleAlphabetic provider/PSP handle (e.g. oksbi, ybl, paytm)
InputIsValidMessage
mohan@oksbiTrueValid UPI VPA.
mohan@@yblFalseInvalid UPI VPA format. Expected name@handle.
mohanyblFalseInvalid UPI VPA format. Expected name@handle.