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)); }
public override String GetErrorMessage(ValidationContext context) { // '{0}' must be {1} character(s) or less return(LocalizedMessage.Format(context.DisplayName, MaxLength)); }
public override String GetErrorMessage(ValidationContext context) { return(LocalizedMessage.Format(context.DisplayName)); }
public override String GetErrorMessage(ValidationContext context) { // '{0}' must be between {1} and {2} character(s) return(LocalizedMessage.Format(context.DisplayName, MinLength, MaxLength)); }