StringLengthAttribute.FormatErrorMessage(String) Metoda

Definicja

Stosuje formatowanie do określonego komunikatu o błędzie.

public:
 override System::String ^ FormatErrorMessage(System::String ^ name);
public override string FormatErrorMessage (string name);
override this.FormatErrorMessage : string -> string
Public Overrides Function FormatErrorMessage (name As String) As String

Parametry

name
String

Nazwa pola, które spowodowało niepowodzenie walidacji.

Zwraca

Sformatowany komunikat o błędzie.

Wyjątki

maximumLength jest ujemna.

-lub-

maximumLength wartość jest mniejsza niż minimumLength.

Bieżący atrybut jest źle sformułowany.

Dotyczy