Validation Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Provides methods and attached properties that support data validation and govern the visual state of the control.
Assembly: System.Windows (in System.Windows.dll)
The Validation type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Errors | Gets a collection of ValidationError objects associated with the binding target element. |
![]() | HasError | Gets a value that indicates whether any binding on the target element has a validation error. |
| Name | Description | |
|---|---|---|
![]() ![]() | GetErrors | Gets the value of the Errors attached property for the specified element. |
![]() ![]() | GetHasError | Gets the value of the HasError attached property for the specified element. |
| Name | Description | |
|---|---|---|
![]() ![]() | ErrorsProperty | Identifies the Errors attached property. |
![]() ![]() | HasErrorProperty | Identifies the HasError attached property. |
The Validation class provides support for displaying validation error information by using a control template. For more information about control templates, see ControlTemplate.
Show:



