Example #1
0
        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public override bool IsValid(object value)
        {
            base.Value = value;

            if (!JudgeUtility.IsInt(value))
            {
                return(false);
            }

            int convValue = Convert.ToInt32(value);

            return(convValue >= minValue && convValue <= maxValue);
        }
        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public override bool IsValid(object value)
        {
            Value = value;

            if (!JudgeUtility.IsInt(value))
            {
                return(false);
            }

            var convValue = Convert.ToInt32(value);

            return(convValue >= minValue);
        }
Example #3
0
 /// <summary>
 /// 数据验证
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public override bool IsValid(object value)
 {
     base.Value = value;
     return(JudgeUtility.IsInt(value));
 }