Validate input against the document type identified by code.
input
code
Internally normalizes the input (strips separators, uppercases). Returns true only if both regex shape AND check digit pass.
true
validate('SV_DUI', '04567890-3') // truevalidate('SV_NIT', '06141505851012') // true Copy
validate('SV_DUI', '04567890-3') // truevalidate('SV_NIT', '06141505851012') // true
Validate
inputagainst the document type identified bycode.Internally normalizes the input (strips separators, uppercases). Returns
trueonly if both regex shape AND check digit pass.