Unplanned
Last Updated: 31 Jan 2024 09:19 by ADMIN
Robert
Created on: 15 Nov 2020 08:28
Category: MaskedInput
Type: Bug Report
0
RegEx mask doesn't work

RegEx mask doesn't work at all.

 

A very basic test mask, single digit required: 

<telerikInput:RadMaskedInput x:Name="maskedInput" Mask="^[0-9]{1}$" MaskType="Regex">


Result:

 

Anything can be typed in.

 

In the ApplyMaskFinished event, e.IsAccepted == true.

 

On top of that, the control has problems when selecting, overtyping and inserting content.

Type something:

Select all text:

Type "1":

I'd expect the entire existing content to be deleted and new value to be "1".

Same goes for inserting a character:

 

Attempt to insert "4" between "3" and "5":

"5" is overtyped. Inserting doesn't work.

1 comment
ADMIN
Yana
Posted on: 19 Nov 2020 11:34

Hello Robert,

Thank you for reporting these issues with RadMaskedInput control.

Indeed, there is a problem with validating the input when regex mask type is used.  I've updated the status of this feedback item to "Unplanned", so we'll have it in mind for the future releases of the suite.

In the meantime, I would suggest you use the "Text" MaskType instead, as in this mode the validation is handled correctly:

<telerikInput:RadMaskedInput x:Name="maskedInput" 
                            Mask="9" 
                            MaskType="Text" 
                            ApplyMaskFinished="maskedInput_ApplyMaskFinished" />

As to the other issues regarding entering symbols - I logged this as a separate feedback item, you can check it directly here:

MaskedInput [UWP]: Selecting and inserting symbols in the input field does not work correctly

I have added some Telerik points to your account for reporting the erroneous behavior with the MaskedInput you've experienced.

Let me know if I can assist with anything else.

Regards,
Yana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.