static PropertyValidator GetPropertyValidator(Type type, string propertyName)
        {
            MemberInfo memberInfo = type.GetProperty(propertyName);

            if (memberInfo == null)
            {
                return(null);
            }
            return(PropertyValidator.FromAttributes(GetAllAttributes(memberInfo), propertyName));
        }
        static PropertyValidator CreateValidator <T, TProperty>(Expression <Func <T, TProperty> > propertyExpression)
        {
            string propertyName = BindableBase.GetPropertyNameFast(propertyExpression);

            return(PropertyValidator.FromAttributes(MetadataHelper.GetExternalAndFluentAPIAttrbutes(typeof(T), propertyName), propertyName));
        }