ValidationAttributeAdapter<TAttribute>.GetErrorMessage(ModelMetadata, Object[]) ValidationAttributeAdapter<TAttribute>.GetErrorMessage(ModelMetadata, Object[]) Method

Definition

Gets the error message formatted using the Attribute.

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

Parameters

modelMetadata
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