Skip to content

Commit 6e97730

Browse files
authored
Dev (#28)
+ Added `ValidationHelper` + `RequiredIfAttribute` can now be added multiple times to an element
1 parent 9dec72e commit 6e97730

20 files changed

+954
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,4 @@ nuget-publish.bat
404404
# Others
405405
**/log.txt
406406
src/ObjectValidation Docs/log.txt
407+
**/TestResults/**/*

src/ObjectValidation CountryValidator/ObjectValidation CountryValidator.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@
3838
<PackagePath>\</PackagePath>
3939
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
4040
</None>
41+
<None Update="ObjectValidation-CountryValidator licenses\LICENSE">
42+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
</None>
44+
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Diagnostics.Abstractions.html">
45+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
46+
</None>
47+
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Options.html">
48+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
49+
</None>
50+
<None Update="ObjectValidation-CountryValidator licenses\Microsoft.Extensions.Primitives.html">
51+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
52+
</None>
53+
<None Update="ObjectValidation-CountryValidator licenses\README.md">
54+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
55+
</None>
4156
<None Update="README.md">
4257
<Pack>True</Pack>
4358
<PackagePath>\</PackagePath>

src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/CountryValidator.html

Lines changed: 342 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Andreas Zimmermann, wan24.de
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html lang="en">
5+
<head>
6+
<link rel="stylesheet" href="/Content/Site.css" />
7+
<title>&#39;MIT&#39; reference</title>
8+
</head>
9+
<body>
10+
<div id="main-content">
11+
12+
13+
14+
<h1>MIT License</h1>
15+
16+
<h2>SPDX identifier</h2>
17+
<div id="license-expression">MIT</div>
18+
19+
<h2>License text</h2>
20+
21+
<div class="optional-license-text">
22+
<p>MIT License</p>
23+
24+
</div>
25+
<div class="replaceable-license-text">
26+
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
27+
</p>
28+
29+
</div>
30+
31+
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
32+
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
33+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
34+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
35+
subject to the following conditions:</p>
36+
37+
<p>The above copyright notice and this permission notice
38+
<var class="optional-license-text"> (including the next paragraph)</var>
39+
shall be included in all copies or substantial
40+
portions of the Software.</p>
41+
42+
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
43+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
44+
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
47+
48+
49+
50+
51+
52+
53+
<h2>SPDX web page</h2>
54+
<ul>
55+
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
56+
</ul>
57+
58+
<h2>Notice</h2>
59+
<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>.
60+
61+
<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>
62+
</div>
63+
</body>
64+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html lang="en">
5+
<head>
6+
<link rel="stylesheet" href="/Content/Site.css" />
7+
<title>&#39;MIT&#39; reference</title>
8+
</head>
9+
<body>
10+
<div id="main-content">
11+
12+
13+
14+
<h1>MIT License</h1>
15+
16+
<h2>SPDX identifier</h2>
17+
<div id="license-expression">MIT</div>
18+
19+
<h2>License text</h2>
20+
21+
<div class="optional-license-text">
22+
<p>MIT License</p>
23+
24+
</div>
25+
<div class="replaceable-license-text">
26+
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
27+
</p>
28+
29+
</div>
30+
31+
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
32+
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
33+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
34+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
35+
subject to the following conditions:</p>
36+
37+
<p>The above copyright notice and this permission notice
38+
<var class="optional-license-text"> (including the next paragraph)</var>
39+
shall be included in all copies or substantial
40+
portions of the Software.</p>
41+
42+
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
43+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
44+
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
47+
48+
49+
50+
51+
52+
53+
<h2>SPDX web page</h2>
54+
<ul>
55+
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
56+
</ul>
57+
58+
<h2>Notice</h2>
59+
<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>.
60+
61+
<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>
62+
</div>
63+
</body>
64+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html lang="en">
5+
<head>
6+
<link rel="stylesheet" href="/Content/Site.css" />
7+
<title>&#39;MIT&#39; reference</title>
8+
</head>
9+
<body>
10+
<div id="main-content">
11+
12+
13+
14+
<h1>MIT License</h1>
15+
16+
<h2>SPDX identifier</h2>
17+
<div id="license-expression">MIT</div>
18+
19+
<h2>License text</h2>
20+
21+
<div class="optional-license-text">
22+
<p>MIT License</p>
23+
24+
</div>
25+
<div class="replaceable-license-text">
26+
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
27+
</p>
28+
29+
</div>
30+
31+
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
32+
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
33+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
34+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
35+
subject to the following conditions:</p>
36+
37+
<p>The above copyright notice and this permission notice
38+
<var class="optional-license-text"> (including the next paragraph)</var>
39+
shall be included in all copies or substantial
40+
portions of the Software.</p>
41+
42+
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
43+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
44+
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
47+
48+
49+
50+
51+
52+
53+
<h2>SPDX web page</h2>
54+
<ul>
55+
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
56+
</ul>
57+
58+
<h2>Notice</h2>
59+
<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>.
60+
61+
<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>
62+
</div>
63+
</body>
64+
</html>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Licenses
2+
3+
This document describes used 3rd party software and their licenses. The
4+
license texts can be found in the text files named after the library. The
5+
exact used library versions can be found in the project files, which are
6+
published in the
7+
[GitHub repository](https://github.com/nd1012/ObjectValidation).
8+
9+
Linked project and license URIs come from the referenced NuGet package meta
10+
data. None of these libraries have been modified and are being used in their
11+
original published form.
12+
13+
## ObjectValidation-CountryValidator referenced libraries
14+
15+
The published `ObjectValidation-CountryValidator` library uses the following
16+
referenced open source libraries:
17+
18+
| Library | License |
19+
| ------- | ------- |
20+
| [`ObjectValidation`](https://github.com/nd1012/ObjectValidation) | [MIT](https://github.com/nd1012/ObjectValidation/blob/main/LICENSE) |
21+
| [`CountryValidator`](https://github.com/anghelvalentin/CountryValidator) | [Apache 2.0](https://licenses.nuget.org/Apache-2.0) |
22+
23+
These referenced libraries have transistive references to these open source
24+
libraries:
25+
26+
| Library | License |
27+
| ------- | ------- |
28+
| [`Microsoft.Extensions.DependencyInjection.Abstractions`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
29+
| [`Microsoft.Extensions.Options`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
30+
| [`Microsoft.Extensions.Primitives`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) |
31+
| [`System.ComponentModel.Annotations`](https://github.com/dotnet/corefx) | [MIT](https://licenses.nuget.org/MIT) |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html lang="en">
5+
<head>
6+
<link rel="stylesheet" href="/Content/Site.css" />
7+
<title>&#39;MIT&#39; reference</title>
8+
</head>
9+
<body>
10+
<div id="main-content">
11+
12+
13+
14+
<h1>MIT License</h1>
15+
16+
<h2>SPDX identifier</h2>
17+
<div id="license-expression">MIT</div>
18+
19+
<h2>License text</h2>
20+
21+
<div class="optional-license-text">
22+
<p>MIT License</p>
23+
24+
</div>
25+
<div class="replaceable-license-text">
26+
<p>Copyright (c) &lt;year&gt; &lt;copyright holders&gt;
27+
</p>
28+
29+
</div>
30+
31+
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of <var class="replaceable-license-text"> this software and
32+
associated documentation files</var> (the &quot;Software&quot;), to deal in the Software without restriction,
33+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
34+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
35+
subject to the following conditions:</p>
36+
37+
<p>The above copyright notice and this permission notice
38+
<var class="optional-license-text"> (including the next paragraph)</var>
39+
shall be included in all copies or substantial
40+
portions of the Software.</p>
41+
42+
<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
43+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
44+
NO EVENT SHALL <var class="replaceable-license-text"> THE AUTHORS OR COPYRIGHT HOLDERS</var> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
47+
48+
49+
50+
51+
52+
53+
<h2>SPDX web page</h2>
54+
<ul>
55+
<li><a href="https://spdx.org/licenses/MIT.html">https://spdx.org/licenses/MIT.html</a></li>
56+
</ul>
57+
58+
<h2>Notice</h2>
59+
<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>.
60+
61+
<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>
62+
</div>
63+
</body>
64+
</html>

src/ObjectValidation Docs/ObjectValidation Docs.csproj

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/ObjectValidation Tests/ObjectValidation Tests.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88

99
<IsPackable>false</IsPackable>
1010
<IsTestProject>true</IsTestProject>
11+
<EnablePreviewFeatures Condition="'$(Configuration)' != 'Release'">True</EnablePreviewFeatures>
1112
</PropertyGroup>
1213

1314
<ItemGroup>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
15-
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
16-
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
17-
<PackageReference Include="coverlet.collector" Version="6.0.1">
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
16+
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
17+
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
18+
<PackageReference Include="coverlet.collector" Version="6.0.2">
1819
<PrivateAssets>all</PrivateAssets>
1920
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2021
</PackageReference>

src/ObjectValidation.sln

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation Tests", "O
99
EndProject
1010
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation CountryValidator", "ObjectValidation CountryValidator\ObjectValidation CountryValidator.csproj", "{BBB4D066-F727-4052-828A-5BA6C6A96491}"
1111
EndProject
12-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ObjectValidation Docs", "ObjectValidation Docs\ObjectValidation Docs.csproj", "{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}"
13-
EndProject
1412
Global
1513
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1614
Debug|Any CPU = Debug|Any CPU
@@ -29,8 +27,6 @@ Global
2927
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Debug|Any CPU.Build.0 = Debug|Any CPU
3028
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Release|Any CPU.ActiveCfg = Release|Any CPU
3129
{BBB4D066-F727-4052-828A-5BA6C6A96491}.Release|Any CPU.Build.0 = Release|Any CPU
32-
{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33-
{A6B522DC-57EA-4B8E-BDE7-37016E7AA672}.Release|Any CPU.ActiveCfg = Release|Any CPU
3430
EndGlobalSection
3531
GlobalSection(SolutionProperties) = preSolution
3632
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)