I have the following:
<StackPanel Grid.Row="3" Orientation="Horizontal"> <Label Width="80" Content="Phone:"/> <ig:XamMaskedInput Width="100" Text="{Binding PhoneNumber}" Mask="(###) ###-####" InvalidValueBehavior="DisplayErrorMessage"/> </StackPanel>
I would like to know how to set the error message to display.
Thanks.
Hello,
Thank you for your post. I have been looking into your issue and I am not sure why you are trying to validate the input as you have set the ‘Mask’ property of the XamMaskedInput. This way you have already restricted the input and it can accept only the specific characters defined in the Mask. Regarding the question about the ‘InvalidValueBehavior’ I can suggest you look into the following links from our online documentation :
http://help.infragistics.com/doc/windowsui/2013.2/CLR4.5?page=InfragisticsWRT.Controls.Editors.XamMaskedInput.v13.2~Infragistics.Controls.Editors.InvalidValueBehavior.html
http://help.infragistics.com/Help/Doc/WPF/2012.2/CLR4.0/html/InfragisticsWPF4.Editors.v12.2~Infragistics.Windows.Editors.ValueEditor~InvalidValueBehavior.html
The second one is WPF related but it is relevant to the WinUI, too.
Please let me know, if you need any further assistance on this matter.
Hi Yanko,
Thank you for your response.
I am not trying to validate the masked input, what I am trying to do is to inform the user what he/she should put in.
For example, if the mask for a textbox is #####, it only accepts numbers, when the user keys in letters, the textbox will not accept the user's input, but I would like to inform the user that this textbox only accept numbers. I was thinking to display the error message to let the user know.