Registers mask tokens globally, beyond the built-in 0 9 A a *
withCustomTokens
Functionforms/input
projects/forms/input/input-config.ts
Description#
Registers mask tokens globally, beyond the built-in 0 9 A a *.
- Each token maps one mask character to a
patternregex, anoptionalflag, and an optional per-chartransform. - Use it when a pattern needs a character class the built-ins lack (hex digit, restricted letter set) across the app rather than per input.
- Merged as
{ ...config.customTokens, ...input.customTokens }, so a per-input[customTokens]entry overrides the global one of the same key.
provideInputConfig(withCustomTokens({
H: { pattern: /[0-9a-fA-F]/, transform: (c) => c.toUpperCase() },
}));
// <input cngxInputMask="#HHHHHH" />