static string GetErrorText(object obj, string propertyName, object value) { Type objType = obj.GetType(); if (obj is IPOCOViewModel) { objType = objType.BaseType; } PropertyValidator validator = GetPropertyValidator(objType, propertyName); if (validator == null) { return(null); } return(validator.GetErrorText(value, obj)); }