Treefrog.Windows.Controllers.ValidationController.ValidateLessEq C# (CSharp) Method

ValidateLessEq() public static method

public static ValidateLessEq ( string fieldName, NumericUpDown control, string refName, NumericUpDown reference ) : Func
fieldName string
control System.Windows.Forms.NumericUpDown
refName string
reference System.Windows.Forms.NumericUpDown
return Func
        public static Func<string> ValidateLessEq(string fieldName, NumericUpDown control, string refName, NumericUpDown reference)
        {
            return () => {
                if (control.Value > reference.Value)
                    return fieldName + " must be less than or equal to " + refName;
                else
                    return ValidateNumericUpDownFunc(fieldName, control)();
            };
        }