fn
guessValidValueByRegExp
testedConform a value to a single-RegExp mask: keep the greedy prefix for which the value still matches, dropping the first character that breaks the pattern.
Signature
ts
export function guessValidValueByRegExp(state: ElementState, mask: RegExp): ElementState{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
state | ElementState | — |
mask | RegExp | — |
Returns
ElementState| Property | Type | Description |
|---|---|---|
value | string | — |
selection | SelectionRange | — |