MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / getPattern

Method getPattern

core/src/components/input-otp/input-otp.tsx:288–294  ·  view source on GitHub ↗

* Gets the string pattern to pass to the input element * and use in the regex for allowed characters.

()

Source from the content-addressed store, hash-verified

286 * and use in the regex for allowed characters.
287 */
288 private getPattern(): string {
289 const { pattern, type } = this;
290 if (pattern) {
291 return pattern;
292 }
293 return type === 'number' ? '[\\p{N}]' : '[\\p{L}\\p{N}]';
294 }
295
296 /**
297 * Get the default value for inputmode.

Callers 2

validKeyPatternMethod · 0.95
renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected