validatePattern
Mask
stable
Run a named or custom validator against an unmasked string. Named validators (e.g. "numeric", "alpha") are looked up in the built-in VALIDATORS registry; unknown names throw to catch typos early.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- unmaskedrequisstring
- The raw value after mask characters have been stripped (output of unmaskValue).
- validatorrequisTPatternValidator
- Either a named validator string (e.g. "numeric", "alpha", "alphanumeric") or a custom (s: string) => boolean function.
API
Valeur de retour
La valeur retournée par cet util.
- true when the unmasked value satisfies the validator, false otherwise.
Usage
Exemples
Extraits de code prêts à coller.
Named and custom validators