IValidationAttributeFormatter.FormatErrorMessage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.