ValidationOptions.MessageKeyProvider Property
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.
Gets or sets a delegate that computes the resource key used to look up a localized validation message.
public:
property Func<Microsoft::Extensions::Validation::ValidationMessageKeyContext ^, System::String ^> ^ MessageKeyProvider { Func<Microsoft::Extensions::Validation::ValidationMessageKeyContext ^, System::String ^> ^ get(); void set(Func<Microsoft::Extensions::Validation::ValidationMessageKeyContext ^, System::String ^> ^ value); };
public Func<Microsoft.Extensions.Validation.ValidationMessageKeyContext,string?>? MessageKeyProvider { get; set; }
member this.MessageKeyProvider : Func<Microsoft.Extensions.Validation.ValidationMessageKeyContext, string> with get, set
Public Property MessageKeyProvider As Func(Of ValidationMessageKeyContext, String)
Property Value
Remarks
The provider supplies the lookup key by convention (for example, keyed by ValidatorType) for validators that do not specify an explicit message. When a validator specifies an explicit message, that message is used as the lookup key and the provider is not consulted.