Edit

Share via


ObservableValidator.ValidateProperty(Object, String) Method

Definition

Validates a property with a specified name and a given input value. If any changes are detected, the ErrorsChanged event will be raised.

protected internal void ValidateProperty(object? value, string propertyName = default);
protected void ValidateProperty(object? value, string? propertyName = default);
member this.ValidateProperty : obj * string -> unit
Protected Friend Sub ValidateProperty (value As Object, Optional propertyName As String = Nothing)
Protected Sub ValidateProperty (value As Object, Optional propertyName As String = Nothing)

Parameters

value
Object

The value to test for the specified property.

propertyName
String

The name of the property to validate.

Exceptions

Thrown when propertyName is null.

CommunityToolkit.Mvvm.ArgumentNullException

Thrown when propertyName is null.

Applies to