public static bool IsOk(this FluentValidator res) { if (res == null) { return(false); } return(!res.HasError); }
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"))); } }
protected abstract void Validate(FluentValidator k, T a);
public void Validate(object item, FluentValidator k) { var a = (T)item; Validate(k, a); }