Unplanned
Last Updated: 05 Sep 2025 06:50 by ADMIN
Shanna
Created on: 04 Sep 2025 09:47
Category: MaskedTextBox
Type: Feature Request
1
MaskedTextBox with includeLiterals = true should return empty string or null when cleared

Currently, when a MaskedTextBox is emptied while the includeLiterals property is set to true, the control returns a string that still contains the literals defined by the mask. This behavior makes it difficult to distinguish between a genuinely empty input and one that contains only literals.

Expected behavior:
When the user clears the input, the MaskedTextBox should return either an empty string ("") or null, even if includeLiterals = true.

Suggested improvement:
Introduce an option on the MaskedTextBox that lets developers choose the desired behavior when clearing:
Keep literals (current behavior),
or Return empty string / null (proposed behavior).

Why this matters:
It complicates validation and data processing, as developers need to add extra logic to detect and strip literals.
In many real-world scenarios, an empty field should semantically represent no input, not a string with placeholder characters.
Making this configurable would give developers flexibility without breaking existing behavior.

Reproducible example:
I’ve created a working example in StackBlitz that demonstrates the issue.

1 comment
ADMIN
Martin Bechev
Posted on: 05 Sep 2025 06:50

Hello Shanna,

Thank you for the provided feedback.

I am converting this request into our public Feedback portal. We will track the customer demand for this enhancement and consider implementing it in the future based on the interest.

The item can be found here:

https://feedback.telerik.com/kendo-angular-ui/1697822-maskedtextbox-with-includeliterals-true-should-return-empty-string-or-null-when-cleared

Regards,
Martin Bechev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.