C# Sharepoint 2013客户端文档库列验证
我尝试用元数据将文件上载到文档库。当我为一列输入验证时,即使数据正确或不正确,文件也不会上载。始终显示此异常 列表数据验证失败 我的代码是C# Sharepoint 2013客户端文档库列验证,c#,list,validation,sharepoint,sharepointdocumentlibrary,C#,List,Validation,Sharepoint,Sharepointdocumentlibrary,我尝试用元数据将文件上载到文档库。当我为一列输入验证时,即使数据正确或不正确,文件也不会上载。始终显示此异常 列表数据验证失败 我的代码是 if (documentsList.BaseType == BaseType.DocumentLibrary) { Folder DocLib = documentsList.RootFolder; FileCreationInformation DocItemInfo = new FileCreationInformation();
if (documentsList.BaseType == BaseType.DocumentLibrary)
{
Folder DocLib = documentsList.RootFolder;
FileCreationInformation DocItemInfo = new FileCreationInformation();
DocItemInfo.ContentStream = GetImageFile();
DocItemInfo.Overwrite = true;
DocItemInfo.Url = "Test.JPG";
Microsoft.SharePoint.Client.File file = DocLib.Files.Add(DocItemInfo);
ListItem newItem = file.ListItemAllFields;
FillSPLitem(ref newItem); // To get MetaData
newItem.Update();
clientContext.ExecuteQuery();
}
请检查它是否与您的列验证相关,或者您是否可以告知您的验证。公式必须返回True或False。