Table of Contents

Struct ValidationMessageFormatterArgs

Namespace
LfrlAnvil.Validation
Assembly
LfrlAnvil.Validation.dll

Represents miscellaneous ValidationMessageFormatter<TResource> arguments.

public readonly struct ValidationMessageFormatterArgs
Inherited Members

Fields

Default

public static readonly ValidationMessageFormatterArgs Default

Field Value

ValidationMessageFormatterArgs

Properties

IncludeIndex

Specifies whether the message formatter should include message indexes.

public bool IncludeIndex { get; }

Property Value

bool

PostfixAll

Specifies an optional message to add once after all validation messages.

public string? PostfixAll { get; }

Property Value

string

PostfixEach

Specifies an optional message to add after each validation message.

public string? PostfixEach { get; }

Property Value

string

PrefixAll

Specifies an optional message to add once before all validation messages. This message receives a single int parameter that defines the number of validation messages.

public string? PrefixAll { get; }

Property Value

string

PrefixEach

Specifies an optional message to add before each validation message.

public string? PrefixEach { get; }

Property Value

string

Separator

Specifies a separator for validation messages. Equal to NewLine by default.

public string Separator { get; }

Property Value

string

Methods

SetIncludeIndex(bool)

Creates a new ValidationMessageFormatterArgs with updates IncludeIndex value.

[Pure]
public ValidationMessageFormatterArgs SetIncludeIndex(bool value)

Parameters

value bool

IncludeIndex value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

SetPostfixAll(string?)

Creates a new ValidationMessageFormatterArgs with updates PostfixAll value.

[Pure]
public ValidationMessageFormatterArgs SetPostfixAll(string? value)

Parameters

value string

PostfixAll value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

SetPostfixEach(string?)

Creates a new ValidationMessageFormatterArgs with updates PostfixEach value.

[Pure]
public ValidationMessageFormatterArgs SetPostfixEach(string? value)

Parameters

value string

PostfixEach value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

SetPrefixAll(string?)

Creates a new ValidationMessageFormatterArgs with updates PrefixAll value.

[Pure]
public ValidationMessageFormatterArgs SetPrefixAll(string? value)

Parameters

value string

PrefixAll value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

SetPrefixEach(string?)

Creates a new ValidationMessageFormatterArgs with updates PrefixEach value.

[Pure]
public ValidationMessageFormatterArgs SetPrefixEach(string? value)

Parameters

value string

PrefixEach value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

SetSeparator(string?)

Creates a new ValidationMessageFormatterArgs with updates Separator value.

[Pure]
public ValidationMessageFormatterArgs SetSeparator(string? value)

Parameters

value string

Separator value to set.

Returns

ValidationMessageFormatterArgs

New ValidationMessageFormatterArgs instance.

ToString()

Returns a string representation of this ValidationMessageFormatterArgs instance.

[Pure]
public override string ToString()

Returns

string

String representation.