Validate a Canadian (CA) identity or business document.
Accepts fully-qualified codes (CA_SIN, CA_BN, CA_PASAPORTE) and short forms SIN, NAS (French alias for SIN), BN, PASAPORTE / PASSPORT.
CA_SIN
CA_BN
CA_PASAPORTE
SIN
NAS
BN
PASAPORTE
PASSPORT
CA document type or short alias.
Raw document string (formatting tolerated).
true if the value passes CA-specific validation rules.
true
import { validate } from "nationid/ca";validate("CA_SIN", "046 454 286"); // truevalidate("BN", "123456789RT0001"); Copy
import { validate } from "nationid/ca";validate("CA_SIN", "046 454 286"); // truevalidate("BN", "123456789RT0001");
Validate a Canadian (CA) identity or business document.
Accepts fully-qualified codes (
CA_SIN,CA_BN,CA_PASAPORTE) and short formsSIN,NAS(French alias for SIN),BN,PASAPORTE/PASSPORT.