예제 #1
0
        public override String GetErrorMessage(ValidationContext context)
        {
            // '{0}' must be {1} {2} and {3} {4}"
            var minPhrase = IncludeMinEndpoint ? ">=" : ">";
            var maxPhrase = IncludeMaxEndpoint ? "<=" : "<";

            return(LocalizedMessage.Format(context.DisplayName, minPhrase, Min, maxPhrase, Max));
        }
예제 #2
0
 public override String GetErrorMessage(ValidationContext context)
 {
     // '{0}' must be {1} character(s) or less
     return(LocalizedMessage.Format(context.DisplayName, MaxLength));
 }
예제 #3
0
 public override String GetErrorMessage(ValidationContext context)
 {
     return(LocalizedMessage.Format(context.DisplayName));
 }
예제 #4
0
 public override String GetErrorMessage(ValidationContext context)
 {
     // '{0}' must be between {1} and {2} character(s)
     return(LocalizedMessage.Format(context.DisplayName, MinLength, MaxLength));
 }