Skip to content

Pattern Mask - Support optional parts #9713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JaneSjs opened this issue Apr 8, 2025 · 0 comments
Open

Pattern Mask - Support optional parts #9713

JaneSjs opened this issue Apr 8, 2025 · 0 comments
Labels
enhancement input_mask user issue An issue or bug reported by users

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Apr 8, 2025

T22756 - Custom Mask with Optional Part
https://surveyjs.answerdesk.io/internal/ticket/details/T22756


Usage scenario: define a custom input mask that includes an optional part. For example:

9999-9999-9999[:9999]

Examples of possible input formats:

  • 9999-9999-9999:9999
  • 9999-9999-9999

This task can be handled using a third-party Inputmask library using the following pattern format: 9999-9999-9999[:9999]
View Demo.

 {
  "name": "q1",
  "title": "Test",
  "type": "text",
  "inputMask": "phone",
  "inputFormat": "9999-9999-9999[:9999]"
}
@JaneSjs JaneSjs added enhancement input_mask user issue An issue or bug reported by users labels Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement input_mask user issue An issue or bug reported by users
Projects
None yet
Development

No branches or pull requests

1 participant