Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Sharepoint 2013客户端文档库列验证_C#_List_Validation_Sharepoint_Sharepointdocumentlibrary - Fatal编程技术网

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。