From: Gonzalo Paniagua Javier Date: Wed, 29 Feb 2012 06:37:59 +0000 (-0500) Subject: Add MinimumLength when formatting X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=59a7bda970cbe0ecf76460d7eae6fceb9a07f5a2;p=mono.git Add MinimumLength when formatting --- diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs index 2a1f9d40896..86a009f7092 100644 --- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs +++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs @@ -57,7 +57,11 @@ namespace System.ComponentModel.DataAnnotations public override string FormatErrorMessage (string name) { +#if NET_4_0 + return String.Format (ErrorMessageString, name, MaximumLength, MinimumLength); +#else return String.Format (ErrorMessageString, name, MaximumLength); +#endif } public override bool IsValid (object value)