The default order is for the ValidationRule to be called before the ConvertBack method of the IValueConverter. This means that the ValidationRule may have to do the same conversion as the converter before it can do the validation.
This order can be changed by specifying the ValidationStep.
<TextBox
MinWidth="100"
Style="{StaticResource tbStyle}"
>
<Binding Path="Dob" Converter="{StaticResource dateFormattingConverter}">
<Binding.ValidationRules>
<app:DobValidationRule ValidationStep="ConvertedProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox>
12 years ago
No comments:
Post a Comment