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.
i used this for IP validation
xaml:
<ige:XamMaskedInput Text="{Binding Value,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" x:Name="maskedEditor" InvalidValueBehavior="DisplayErrorMessageAndRevertValue" ValidationError="MaskedEditor_OnValidationError" Mask="{}{number:1-223}.{number:0-255}.{number:0-255}.{number:0-255}"/>
CodeBehind:
private void MaskedEditor_OnValidationError(object sender, EditModeValidationErrorEventArgs e)
{
e.ErrorMessage = "0 is not a valid entry, please specify a value between 1 and 223";
}