I need to validate a field bound to a TextBox , it's DataContext implements IDataErrorInfo
<TextBox x:Name="txt" Text="{Binding PatientID, ValidatesOnDataErrors=True}" />
I need the Error to be shown on the TextBox and for the sake of simplicity 2 more textblocks in my form :
<TextBox x:Name="txt" Text="{Binding Name, ValidatesOnDataErrors=True}" />
<TextBlock Text="TXT 1" Validation.ValidationAdornerSiteFor="{Binding ElementName=txt}" />
<TextBlock Text="TXT 2" Validation.ValidationAdornerSiteFor="{Binding ElementName=txt}" />
The problem here is that using ValidationAdornerSiteFor does not leave the validation on the TextBox mark on the TextBox it is applied solely on the UIElement using Validation.ValidationAdornerSiteFor secondly using Validation.ValidationAdornerSiteFor leaves only the last UIElement which used it marked with the validation error (TXT 2)
What mechanism can i use to show a Validation error that was raised on one field on 3 different controls including the one actually bound to the field (i.e. the TextBox) ,
by showing the Validation error i mean the red border (or any Validation Template) on the control.