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.
Watermark text is not displayed on Android.
Workaround:
set the WatermarkText property in code-behind with some delay:
Device.BeginInvokeOnMainThread(() =>
{
mask.WatermarkText = "enter e-mail here";
}
System.ArgumentOutOfRangeException: Count cannot be less than zero. Parameter name: count at System.String.Remove(Int32 startIndex, Int32 count) at Telerik.XamarinForms.Input.MaskedInput.MaskParser.ConstructCandidateTextForMaskTypeRegex(String oldText, Int32 startIndex, Int32 selectionLength, String enteredText, Boolean userDeletes, Int32& insertIndex) at Telerik.XamarinForms.InputRenderer.UWP.MaskedInputFormsTextBox.CreateCandidateText(KeyRoutedEventArgs e, Int32& actualInsertIndex)
The issue can be reproduced in SDK Browser application MaskedInput/Features/Regex Mask example IP and email masks when enter symbol like ., @, etc.
Implement a Keyboard property which will allow users to set the virtual keyboard according to the expected input
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.
Meaning, if we have Mask ="00000", when placing the caret after 3 in 1234_ and pressing 5 we will overtype 4 and the result would be 1235_.
In insert mode, the 5 to be inserted between 3 and 4, meaning 12354.
Press the delete key to make the input "1.11.2020.":
Or press the backspace key:
The ApplyMaskStarted event isn't fired.
It's not about the mask, since it's set as follows (it's not working at all, as reported in the other bug):
Mask="^[0-9]$"
sample MaskedInput definition:
_Telephone = new RadMaskedInput
{
Mask = "[(][0-9]{3}[)] [0-9]{3}-[0-9]{4}",
MaskType = MaskType.Regex,
WatermarkText = "Phone # (999) 999-9999",
RejectedSymbolErrorText = "Only Numbers Allowed!",
InvalidInputErrorText = "Invalid Input",
WatermarkTextColor = Color.Black,
ErrorColor = Color.Red,
DisplayedTextColor = Color.Black,
};
_Telephone.InputValue = "2223334444";
Grid.Children.Add(_Telephone, 0, 0);
and the result:
The Xamarin.Forms MaskedInput control running on Android with the SwiftKey keyboard app installed does not allow for correct text entry and causes the app to Crash. Using the default keyboard the control works correctly.
MaskedInput ignores VerticalOptions
For example the control ignores IsTabStop and TabIndex properties for keyboard tab navigation. It behaves differently on Android, iOS and UWP.
Available in R2 2018 SP release.
On Sony Xperia there is a default Xperia keyboard where the following behavior with MaskedInput is observed:
- while typing into MaskedInput input field, the cursor jumps a few positions;
- users cannot enter spaces;