예제 #1
0
        public static bool IsOk(this FluentValidator res)
        {
            if (res == null)
            {
                return(false);
            }

            return(!res.HasError);
        }
예제 #2
0
        public FluentValidator Validate(object item)
        {
            var res = new FluentValidator();

            try
            {
                var a = (T)item;
                Validate(res, a);

                return(res);
            }
            catch (Exception ex)
            {
                log.LogError(ex.ToString());

                return(res.AddError(Tran.Instance.Get("UnknownError")));
            }
        }
예제 #3
0
 protected abstract void Validate(FluentValidator k, T a);
예제 #4
0
        public void Validate(object item, FluentValidator k)
        {
            var a = (T)item;

            Validate(k, a);
        }