Validate input against the document type identified by code.
Internally normalizes the input (strips separators, uppercases). Returns
true only if both regex shape AND check digit pass. Never throws on
malformed input — use parse() if you need the failure reason.
Validate
inputagainst the document type identified bycode.Internally normalizes the input (strips separators, uppercases). Returns
trueonly if both regex shape AND check digit pass. Never throws on malformed input — useparse()if you need the failure reason.