IValidationAttributeFormatter.FormatErrorMessage Method

Definition

Formats the specified messageTemplate by substituting attribute-specific arguments alongside the displayName.

public:
 System::String ^ FormatErrorMessage(System::Globalization::CultureInfo ^ culture, System::String ^ messageTemplate, System::String ^ displayName);
public string FormatErrorMessage(System.Globalization.CultureInfo culture, string messageTemplate, string displayName);
abstract member FormatErrorMessage : System.Globalization.CultureInfo * string * string -> string
Public Function FormatErrorMessage (culture As CultureInfo, messageTemplate As String, displayName As String) As String

Parameters

culture
CultureInfo

The CultureInfo to use when formatting.

messageTemplate
String

The error message template containing format placeholders.

displayName
String

The resolved display name of the member being validated.

Returns

The fully formatted error message.

Applies to