I create a simple demo for your one need: 
You could create the Textbox in the UI with Validation and MaxLength:
<TextBox Name="txtMyLength" MaxLength="8" Width="200" Margin="140" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding validModel.MyLength, ValidatesOnDataErrors=True}" />
Then set the Style for the TextBox for error tip:
<Style TargetType="TextBox"> <Setter Property="Validation.ErrorTemplate"> <Setter.Value> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Border BorderThickness="1" BorderBrush="Red" VerticalAlignment="Top"> <Grid> <AdornedElementPlaceholder x:Name="adorner" Margin="-1"/> </Grid> </Border> <Border x:Name="errorBorder" Background="Red" Margin="8,0,0,0" Opacity="0" CornerRadius="0" IsHitTestVisible="False" MinHeight="24" > <TextBlock Text="{Binding ElementName=adorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" Foreground="Black" Margin="8,3,8,3" TextWrapping="Wrap" VerticalAlignment="Center"/> </Border> </StackPanel> <ControlTemplate.Triggers> <DataTrigger Value="True"> <DataTrigger.Binding> ...... </DataTrigger.Binding> <DataTrigger.EnterActions> <BeginStoryboard x:Name="in"> <Storyboard> ...... </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> <DataTrigger.ExitActions> <StopStoryboard BeginStoryboardName="in"/> <BeginStoryboard x:Name="out"> ....... </BeginStoryboard> </DataTrigger.ExitActions> </DataTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style>
create the condition in the ValidModel like
public string this[string columnName] { get { int txtLength = 0; string result = string.Empty; if (MyLength != "" && MyLength != null) { txtLength = MyLength.ToString().Length; } switch (columnName) { case "MyLength": if (txtLength != 8 ) result = "ID be 8 numbers"; break; case ....... }; return result; }