Skip to content

Single-Line Input: Masked value is cleared when the editor loses focus #8030

@JaneSjs

Description

@JaneSjs

T17459 - Generate a Pattern Input Mask for Entering a Fixed Number of Digits
https://surveyjs.answerdesk.io/internal/ticket/details/T17459


In the meantime, a user-entered value is cleared if it doesn't match a specified mask pattern.
View Demo

Introduce an option which would notify a user that the value entered should match the specified format.


If the user input matches the mask +1 (999) 99 99 then the editor will have a value +1 (777) 88 99 and the question value will have a value 17778899 if saveMaskedValue is false and +1 (777) 88 99 value if saveMaskedValue is true.

If the user did not enter a complete value and exits the editor or the default value does not match the mask, then the value +1 (777) 88 __ will be displayed in the editor and the question value will have a value 177788 if saveMaskedValue is false and +1 (777) 88 value if saveMaskedValue is true.

https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#keepIncorrectValues

When should an error message indicate that the entered value does not match the mask? When leaving the editor, when trying to go to another page/complete a survey or a third option?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions