The WPF data binding model enables you to associate validation rules with your Binding object. Validation occurs during target-to-source value transfer before the converter is called. The following describes the validation process.

When a value is being transferred from the target property to the source property, the data binding engine first removes any ValidationError that might have been added to the Validation.Errors attached property of the bound element. It then checks whether any custom validation rules are defined for that Binding, in which case it calls the Validate method on each ValidationRule until one of them fails or until all of them pass.

The following example shows a style trigger that creates a ToolTip that reports a validation error message. The Validation.Errors attached property returns a collection of ValidationError objects on the bound element.