Skip to content

Commit

Permalink
Dev (#28)
Browse files Browse the repository at this point in the history
+ Added `ValidationHelper`
+ `RequiredIfAttribute` can now be added multiple times to an element
  • Loading branch information
nd1012 authored Jul 13, 2024
1 parent 9dec72e commit 6e97730
Show file tree
Hide file tree
Showing 20 changed files with 954 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,4 @@ nuget-publish.bat
# Others
**/log.txt
src/ObjectValidation Docs/log.txt
**/TestResults/**/*
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@
<PackagePath>\</PackagePath>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ObjectValidation-CountryValidator licenses\LICENSE">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Diagnostics.Abstractions.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Options.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Primitives.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ObjectValidation-CountryValidator licenses\README.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Andreas Zimmermann, wan24.de

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<!DOCTYPE html>

<html lang="en">
<head>
<link rel="stylesheet" href="/Content/Site.css" />
<title>&#39;MIT&#39; reference</title>
</head>
<body>
<div id="main-content">



<h1>MIT License</h1>

<h2>SPDX identifier</h2>
<div id="license-expression">MIT</div>

<h2>License text</h2>

<div class="optional-license-text">
<p>MIT License</p>

</div>
<div class="replaceable-license-text">
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
</p>

</div>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:</p>

<p>The above copyright notice and this permission notice
<var class="optional-license-text"> (including the next paragraph)</var>
shall be included in all copies or substantial
portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>






<h2>SPDX web page</h2>
<ul>
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
</ul>

<h2>Notice</h2>
<p>This license content is provided by the <a href="https://spdx.dev/">SPDX project</a>. For more information about <b>licenses.nuget.org</b>, see <a href="https://aka.ms/licenses.nuget.org">our documentation</a>.

<p><i>Data pulled from <a href="https://github.com/spdx/license-list-data">spdx/license-list-data</a> on February 9, 2023.</i></p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<!DOCTYPE html>

<html lang="en">
<head>
<link rel="stylesheet" href="/Content/Site.css" />
<title>&#39;MIT&#39; reference</title>
</head>
<body>
<div id="main-content">



<h1>MIT License</h1>

<h2>SPDX identifier</h2>
<div id="license-expression">MIT</div>

<h2>License text</h2>

<div class="optional-license-text">
<p>MIT License</p>

</div>
<div class="replaceable-license-text">
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
</p>

</div>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:</p>

<p>The above copyright notice and this permission notice
<var class="optional-license-text"> (including the next paragraph)</var>
shall be included in all copies or substantial
portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>






<h2>SPDX web page</h2>
<ul>
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
</ul>

<h2>Notice</h2>
<p>This license content is provided by the <a href="https://spdx.dev/">SPDX project</a>. For more information about <b>licenses.nuget.org</b>, see <a href="https://aka.ms/licenses.nuget.org">our documentation</a>.

<p><i>Data pulled from <a href="https://github.com/spdx/license-list-data">spdx/license-list-data</a> on February 9, 2023.</i></p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<!DOCTYPE html>

<html lang="en">
<head>
<link rel="stylesheet" href="/Content/Site.css" />
<title>&#39;MIT&#39; reference</title>
</head>
<body>
<div id="main-content">



<h1>MIT License</h1>

<h2>SPDX identifier</h2>
<div id="license-expression">MIT</div>

<h2>License text</h2>

<div class="optional-license-text">
<p>MIT License</p>

</div>
<div class="replaceable-license-text">
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
</p>

</div>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:</p>

<p>The above copyright notice and this permission notice
<var class="optional-license-text"> (including the next paragraph)</var>
shall be included in all copies or substantial
portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>






<h2>SPDX web page</h2>
<ul>
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
</ul>

<h2>Notice</h2>
<p>This license content is provided by the <a href="https://spdx.dev/">SPDX project</a>. For more information about <b>licenses.nuget.org</b>, see <a href="https://aka.ms/licenses.nuget.org">our documentation</a>.

<p><i>Data pulled from <a href="https://github.com/spdx/license-list-data">spdx/license-list-data</a> on February 9, 2023.</i></p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licenses

This document describes used 3rd party software and their licenses. The
license texts can be found in the text files named after the library. The
exact used library versions can be found in the project files, which are
published in the
[GitHub repository](https://github.com/nd1012/ObjectValidation).

Linked project and license URIs come from the referenced NuGet package meta
data. None of these libraries have been modified and are being used in their
original published form.

## ObjectValidation-CountryValidator referenced libraries

The published `ObjectValidation-CountryValidator` library uses the following
referenced open source libraries:

| Library | License |
| ------- | ------- |
| [`ObjectValidation`](https://github.com/nd1012/ObjectValidation) | [MIT](https://github.com/nd1012/ObjectValidation/blob/main/LICENSE) |
| [`CountryValidator`](https://github.com/anghelvalentin/CountryValidator) | [Apache 2.0](https://licenses.nuget.org/Apache-2.0) |

These referenced libraries have transistive references to these open source
libraries:

| Library | License |
| ------- | ------- |
| [`Microsoft.Extensions.DependencyInjection.Abstractions`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
| [`Microsoft.Extensions.Options`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
| [`Microsoft.Extensions.Primitives`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
| [`System.ComponentModel.Annotations`](https://github.com/dotnet/corefx) | [MIT](https://licenses.nuget.org/MIT) |
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

<!DOCTYPE html>

<html lang="en">
<head>
<link rel="stylesheet" href="/Content/Site.css" />
<title>&#39;MIT&#39; reference</title>
</head>
<body>
<div id="main-content">



<h1>MIT License</h1>

<h2>SPDX identifier</h2>
<div id="license-expression">MIT</div>

<h2>License text</h2>

<div class="optional-license-text">
<p>MIT License</p>

</div>
<div class="replaceable-license-text">
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
</p>

</div>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:</p>

<p>The above copyright notice and this permission notice
<var class="optional-license-text"> (including the next paragraph)</var>
shall be included in all copies or substantial
portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>






<h2>SPDX web page</h2>
<ul>
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
</ul>

<h2>Notice</h2>
<p>This license content is provided by the <a href="https://spdx.dev/">SPDX project</a>. For more information about <b>licenses.nuget.org</b>, see <a href="https://aka.ms/licenses.nuget.org">our documentation</a>.

<p><i>Data pulled from <a href="https://github.com/spdx/license-list-data">spdx/license-list-data</a> on February 9, 2023.</i></p>
</div>
</body>
</html>
14 changes: 0 additions & 14 deletions src/ObjectValidation Docs/ObjectValidation Docs.csproj

This file was deleted.

9 changes: 5 additions & 4 deletions src/ObjectValidation Tests/ObjectValidation Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<EnablePreviewFeatures Condition="'$(Configuration)' != 'Release'">True</EnablePreviewFeatures>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
<PackageReference Include="coverlet.collector" Version="6.0.1">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 0 additions & 4 deletions src/ObjectValidation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation Tests", "O
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation CountryValidator", "ObjectValidation CountryValidator\ObjectValidation CountryValidator.csproj", "{BBB4D066-F727-4052-828A-5BA6C6A96491}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation Docs", "ObjectValidation Docs\ObjectValidation Docs.csproj", "{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,8 +27,6 @@ Global
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Release|Any CPU.Build.0 = Release|Any CPU
{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit 6e97730

Please sign in to comment.