/// <summary> /// check required cho model /// </summary> /// <param name="name">Tap hop ten các thuộc tính cần required theo thu tự</param> /// <param name="arr">các properties cần required</param> /// <returns></returns> public static List <String> validateRequiredObject(string[] name, object[] arr) { return(ModelValidate.validateRequiredObject(name, arr)); }
/// <summary> /// check required cho model /// </summary> /// <typeparam name="T"></typeparam> /// <param name="objectVal">object can check required</param> /// <param name="arr">mảng chuỗi tên thuộc tính càn check required</param> /// <returns>Chuỗi nội dung lỗi</returns> public static String validateRequiredObject(ModelBase objRequest, params string[] arr) { return(ModelValidate.validateRequiredObject <ModelBase>(objRequest, arr)); }