IValidationLocalizer.ResolveErrorMessage 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.
Resolves a fully-formatted localized error message for the validation attribute described
by context.
public:
System::String ^ ResolveErrorMessage(Microsoft::Extensions::Validation::ErrorMessageLocalizationContext ^ context);
public string? ResolveErrorMessage(in Microsoft.Extensions.Validation.ErrorMessageLocalizationContext? context);
abstract member ResolveErrorMessage : ErrorMessageLocalizationContext -> string
Public Function ResolveErrorMessage (context As ErrorMessageLocalizationContext) As String
Parameters
- context
- ErrorMessageLocalizationContext
Information about the validation attribute and the member it applied to.
Returns
The fully-formatted localized error message, or null to use the
attribute's default message.
Remarks
Implementations should return null when no localized message is available; the validation pipeline falls back to the attribute's default error message.