示例#1
0
        public override string Message(ValueControl control)
        {
            var result = string.Empty;

            if (Min.HasValue && Max.HasValue)
                result = string.Format(Resource.LengthBetweenMessage, control.Label, Min.Value, Max.Value );
            else if (Min.HasValue && !Max.HasValue)
                result = string.Format(Resource.LengthFromMessage, control.Label, Min.Value);
            else if (!Min.HasValue && Max.HasValue)
                result = string.Format(Resource.LengthToMessage, control.Label, Max.Value);

            return result;
        }
示例#2
0
 public abstract string Message(ValueControl control);