Binding.ValidationRules Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets a collection of rules that check the validity of the user input.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

member ValidationRules : Collection<ValidationRule> with get

Property Value

Type: System.Collections.ObjectModel.Collection<ValidationRule>

A collection of ValidationRule objects.

The WPF data binding model enables you to associate ValidationRules with your Binding or MultiBinding object. You can create custom rules by deriving from the ValidationRule class and implementing the Validate method, or you can use the built-in ExceptionValidationRule, which invalidates a value if there are exceptions during source updates.

The binding engine checks each ValidationRule associated with a binding each time an input value (the binding target property value) is transferred to the binding source property. For a detailed discussion of the validation process, see the Data Validation section in the Data Binding Overview.


This property can be set in Extensible Application Markup Language (XAML) only by using the collection syntax shown, or by accessing the collection object and using its various methods, such as Add. The property to access the collection object is read-only, whereas the collection itself is read-write.



One or more ValidationRule objects. You can use the ExceptionValidationRule class or create custom rules by subclassing the ValidationRule class.

.NET Framework
Available since 3.0
Return to top