MaxLengthAttribute.FormatErrorMessage Method
Applies formatting to a specified error message. (Overrides <see cref="M:System.ComponentModel.DataAnnotations.ValidationAttribute.FormatErrorMessage(System.String)" />)
Namespace: System.ComponentModel.DataAnnotations
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
Public Overrides Function FormatErrorMessage ( _
name As String _
) As String
'Usage
Dim instance As MaxLengthAttribute
Dim name As String
Dim returnValue As String
returnValue = instance.FormatErrorMessage(name)
public override string FormatErrorMessage(
string name
)
public:
virtual String^ FormatErrorMessage(
String^ name
) override
abstract FormatErrorMessage :
name:string -> string
override FormatErrorMessage :
name:string -> string
public override function FormatErrorMessage(
name : String
) : String
Parameters
- name
Type: System.String
The name to include in the formatted string.
Return Value
Type: System.String
A localized string to describe the maximum acceptable length.