Telerik Forums
UI for Blazor Forum
1 answer
50 views

We are using a masked textbox to allow users to enter a US phone number, formatted as 000-000-0000, so all digits are required. The user is collecting a phone number from someone on a telephone call. Most of the time, the caller provides their phone number area code first, then they give the 7 digit number, so that works great. But sometimes, the caller doesn't think about giving their area code. In that case, the number looks like:

555-555-5, which is not right. Then we have to ask the caller for their area code. If the user clicks before the first 5, and starts typing, they overwrite the existing numbers. We would like it to insert the area code and push everything else to the right. If there are already 10 digits and we just want to change a number, then overwrite. 

Does that make sense? Is that something that can be done?

Svetoslav Dimitrov
Telerik team
 answered on 06 Oct 2023
0 answers
45 views

**Question Removed Due to Finding Answer***
Cannot delete question which is a shame.

TWK
Top achievements
Rank 1
 updated question on 13 Jun 2023
2 answers
359 views

Hello,

How do I force user input to uppercase?

I have this mask:  Mask="00-LLLA00000000"

I want the LLL to always be uppercase.

When A is an alpha character, I want it to be uppercase as well.

Thanks,

TFISHER

Brett
Top achievements
Rank 1
Iron
 updated answer on 02 May 2023
1 answer
62 views
I want to ignore _ only numbers are allowed.
Peter
Top achievements
Rank 1
Iron
Iron
 answered on 19 Jul 2022
0 answers
57 views
I was thinking of using the MaskedText component to provide the user with more information on how to complete a form and also to validate the values entered along with regular expressions in annotations.

The component works well when the format of the mask is inflexible but unfortunately most of the values that are entered in a form are not. It works but it's not very useful.

My question is the following: is there a way to have rules that make the format of the mask more flexible (without falling in js)?

The full set of alternatives that regular expressions have may be too much, but at least a subset would be convenient.

Do you plan to extend the rules to be more flexible?

Greetings.
Ludwig.
Blazorist
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 04 May 2022
1 answer
910 views
I love the Masked TextBox control. We are using it for a a social security field with a mask of xxx-xx-xxxx. But we also need to have the value shown as ***-**-**** so that ssns are not reveled. Is this possible? I know we can use the standard TextBox and set it to password which hides the input, but we need to mask it somehow to be an ssn. Any Ideas on this?
Dimo
Telerik team
 answered on 27 May 2021
2 answers
259 views

I am debating if I want to use the MaskedTextBox instead of the TextBox.  If I use the MaskedTextBox, I would need to give it a collection of masks.  For example

  • ISBN-13: 000-0-00000-000-0
  • ISBN-10 0-00000-000-0
  • ASIN: AAAAAAAAAA

Thanks

-marc

Marc Simkin
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 25 Feb 2021
3 answers
456 views
I typically use the mask to prevent the user from entering in "bad" characters. Is this possible with MaskTextBox? I only saw a handful of predefined rules. I know I can use validation too. Perhaps the best method is to notify the user their input is bad AND not allow it to be inputted...
Marin Bratanov
Telerik team
 answered on 07 Jan 2021
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?