ValidationAttributeAdapter<TAttribute>.GetErrorMessage 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.
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.