Share via


ValidationAttributeAdapter<TAttribute>.GetErrorMessage Method

Definition

Gets the error message formatted using the Attribute.

protected:
 virtual System::String ^ GetErrorMessage(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ modelMetadata, ... cli::array <System::Object ^> ^ arguments);
protected virtual string GetErrorMessage (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, params object[] arguments);
abstract member GetErrorMessage : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj[] -> string
override this.GetErrorMessage : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj[] -> string
Protected Overridable Function GetErrorMessage (modelMetadata As ModelMetadata, ParamArray arguments As Object()) As String

Parameters

modelMetadata
ModelMetadata

The ModelMetadata associated with the model annotated with Attribute.

arguments
Object[]

The value arguments which will be used in constructing the error message.

Returns

Formatted error string.

Applies to