diff --git a/src/Avalonia.Controls/ComboBox.cs b/src/Avalonia.Controls/ComboBox.cs
index eb1eab5856..1571eb9fe7 100644
--- a/src/Avalonia.Controls/ComboBox.cs
+++ b/src/Avalonia.Controls/ComboBox.cs
@@ -86,7 +86,8 @@ namespace Avalonia.Controls
/// Defines the property
///
public static readonly StyledProperty TextProperty =
- TextBlock.TextProperty.AddOwner(new(string.Empty, BindingMode.TwoWay));
+ TextBlock.TextProperty.AddOwner(new(string.Empty, BindingMode.TwoWay,
+ enableDataValidation: true));
///
/// Defines the property.
diff --git a/tests/Avalonia.Controls.UnitTests/ComboBoxTests.cs b/tests/Avalonia.Controls.UnitTests/ComboBoxTests.cs
index ca1fa66d91..578484557f 100644
--- a/tests/Avalonia.Controls.UnitTests/ComboBoxTests.cs
+++ b/tests/Avalonia.Controls.UnitTests/ComboBoxTests.cs
@@ -392,6 +392,28 @@ namespace Avalonia.Controls.UnitTests
}
+ [Fact]
+ public void Text_Validation()
+ {
+ using (UnitTestApplication.Start(TestServices.MockThreadingInterface))
+ {
+ var target = new ComboBox
+ {
+ Template = GetTemplate(),
+ };
+
+ target.ApplyTemplate();
+ target.Presenter!.ApplyTemplate();
+
+ var exception = new System.InvalidCastException("failed validation");
+ var textObservable = new BehaviorSubject(new BindingNotification(exception, BindingErrorType.DataValidationError));
+ target.Bind(ComboBox.TextProperty, textObservable);
+
+ Assert.True(DataValidationErrors.GetHasErrors(target));
+ Assert.Equal([exception], DataValidationErrors.GetErrors(target));
+ }
+ }
+
[Fact]
public void Close_Window_On_Alt_F4_When_ComboBox_Is_Focus()
{