Validate a Peruvian (PE) identity or tax document.
Document type, either fully-qualified (PE_DNI, PE_RUC) or short (DNI, CE, RUC, PASAPORTE).
PE_DNI
PE_RUC
DNI
CE
RUC
PASAPORTE
Raw document string (formatting tolerated).
true if the value passes PE-specific validation rules.
true
import { validate } from "nationid/pe";validate("PE_DNI", "12345678");validate("RUC", "20100070970"); Copy
import { validate } from "nationid/pe";validate("PE_DNI", "12345678");validate("RUC", "20100070970");
Validate a Peruvian (PE) identity or tax document.