Skip to content

Commit 26bc04b

Browse files
SubhikshaSf4851PureWeen
authored andcommitted
Fix for validation throw an ArgumentException
1 parent 9f8e15b commit 26bc04b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controls/src/Core/BindableObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ internal void SetValueCore(BindableProperty property, object value, SetValueFlag
566566
if (property.ValidateValue != null && !property.ValidateValue(this, value))
567567
{
568568
Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Value is an invalid value for {property.PropertyName}");
569-
return;
569+
throw new ArgumentException($"Value is an invalid value for {property.PropertyName}", nameof(value));
570570
}
571571

572572
if (property.CoerceValue != null)

0 commit comments

Comments
 (0)