ValidateOptionsResultBuilder.AddError(String, String) Method

Definition

Adds a new validation error to the builder.

public void AddError (string error, string? propertyName = default);
member this.AddError : string * string -> unit
Public Sub AddError (error As String, Optional propertyName As String = Nothing)

Parameters

error
String

The content of the error message.

propertyName
String

The property in the option object that contains an error.

Applies to