wpf-devexpress-dot-xpf-dot-editors-dot-validationservice-752e7b4c.md
Indicates whether validation has failed. This is an attached property.
Namespace : DevExpress.Xpf.Editors
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
See GetHasValidationError(DependencyObject).
| Type | Description |
|---|---|
| Boolean |
true if validation has failed; otherwise, false.
|
The ValidationService.HasValidationError attached property returns true for container controls that contain editors with validation errors. This property detects the following validation types (supported by DevExpress WPF Controls): validation interfaces, the Validate event, the ValidationService class, and ValidationRule descendants.
<Border dxe:ValidationService.IsValidationContainer="True"
BorderThickness="2"
BorderBrush="{Binding Path=(dxe:ValidationService.HasValidationError),
Converter={dxmvvm:BooleanToObjectConverter TrueValue=Red, FalseValue=Black},
RelativeSource={RelativeSource Self}}">
<dxe:TextEdit Validate="OnValidate"/>
</Border>
The ValidationErrors property returns a collection of validation errors.
See Also