diff --git a/.gitignore b/.gitignore index 8449bca..bcee129 100644 --- a/.gitignore +++ b/.gitignore @@ -404,3 +404,4 @@ nuget-publish.bat # Others **/log.txt src/ObjectValidation Docs/log.txt +**/TestResults/**/* diff --git a/src/ObjectValidation CountryValidator/ObjectValidation CountryValidator.csproj b/src/ObjectValidation CountryValidator/ObjectValidation CountryValidator.csproj index c57b10e..e28aeec 100644 --- a/src/ObjectValidation CountryValidator/ObjectValidation CountryValidator.csproj +++ b/src/ObjectValidation CountryValidator/ObjectValidation CountryValidator.csproj @@ -38,6 +38,21 @@ \ Always + + Always + + + Always + + + Always + + + Always + + + Always + True \ diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/CountryValidator.html b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/CountryValidator.html new file mode 100644 index 0000000..32938d9 --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/CountryValidator.html @@ -0,0 +1,342 @@ + + + + + + + 'Apache-2.0' reference + + +
+ + + +

Apache License 2.0

+ +

SPDX identifier

+
Apache-2.0
+ +

License text

+ +
+

Apache License +
+ +Version 2.0, January 2004 +
+ +http://www.apache.org/licenses/ +

+ +
+
+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+ +
+ + + +
+

END OF TERMS AND CONDITIONS

+ +

APPENDIX: How to apply the Apache License to your work.

+ +

To apply the Apache License to your work, attach the following boilerplate notice, with the fields + enclosed by brackets "[]" replaced with your own identifying information. (Don't + include the brackets!) The text should be enclosed in the appropriate comment syntax for the file + format. We also recommend that a file or class name and description of purpose be included on the same + "printed page" as the copyright notice for easier identification within third-party + archives.

+ +

Copyright [yyyy] [name of copyright owner]

+ +

Licensed under the Apache License, Version 2.0 (the "License"); +
+ +you may not use this file except in compliance with the License. +
+ +You may obtain a copy of the License at +

+ +

http://www.apache.org/licenses/LICENSE-2.0

+ +

Unless required by applicable law or agreed to in writing, software +
+ +distributed under the License is distributed on an "AS IS" BASIS, +
+ +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +
+ +See the License for the specific language governing permissions and +
+ +limitations under the License. +

+ +
+ + +

Standard License Header

+ +

Copyright [yyyy] [name of copyright owner]

+ +

Licensed under the Apache License, Version 2.0 (the "License"); +
+ +you may not use this file except in compliance with the License. +
+ +You may obtain a copy of the License at +

+ +

http://www.apache.org/licenses/LICENSE-2.0

+ +

Unless required by applicable law or agreed to in writing, software +
+ +distributed under the License is distributed on an "AS IS" BASIS, +
+ +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +
+ +See the License for the specific language governing permissions and +
+ +limitations under the License. +

+ + + +

Notes

+

This license was released January 2004

+ +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/LICENSE b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/LICENSE new file mode 100644 index 0000000..62d5ca8 --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/LICENSE @@ -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. diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Diagnostics.Abstractions.html b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Diagnostics.Abstractions.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Diagnostics.Abstractions.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Options.html b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Options.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Options.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Primitives.html b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Primitives.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/Microsoft.Extensions.Primitives.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/README.md b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/README.md new file mode 100644 index 0000000..891840e --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/README.md @@ -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) | diff --git a/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/System.ComponentModel.Annotations.html b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/System.ComponentModel.Annotations.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation CountryValidator/ObjectValidation-CountryValidator licenses/System.ComponentModel.Annotations.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation Docs/ObjectValidation Docs.csproj b/src/ObjectValidation Docs/ObjectValidation Docs.csproj deleted file mode 100644 index 2c9d59c..0000000 --- a/src/ObjectValidation Docs/ObjectValidation Docs.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - net8.0 - ObjectValidation_Docs - enable - enable - - - - - - - diff --git a/src/ObjectValidation Tests/ObjectValidation Tests.csproj b/src/ObjectValidation Tests/ObjectValidation Tests.csproj index 0806c6d..a1f193e 100644 --- a/src/ObjectValidation Tests/ObjectValidation Tests.csproj +++ b/src/ObjectValidation Tests/ObjectValidation Tests.csproj @@ -8,13 +8,14 @@ false true + True - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/ObjectValidation.sln b/src/ObjectValidation.sln index 387dc78..5d431a9 100644 --- a/src/ObjectValidation.sln +++ b/src/ObjectValidation.sln @@ -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 @@ -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 diff --git a/src/ObjectValidation/ObjectValidation licenses/LICENSE b/src/ObjectValidation/ObjectValidation licenses/LICENSE new file mode 100644 index 0000000..62d5ca8 --- /dev/null +++ b/src/ObjectValidation/ObjectValidation licenses/LICENSE @@ -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. diff --git a/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Diagnostics.Abstractions.html b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Diagnostics.Abstractions.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Diagnostics.Abstractions.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Options.html b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Options.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Options.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Primitives.html b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Primitives.html new file mode 100644 index 0000000..ce9da3e --- /dev/null +++ b/src/ObjectValidation/ObjectValidation licenses/Microsoft.Extensions.Primitives.html @@ -0,0 +1,64 @@ + + + + + + + 'MIT' reference + + +
+ + + +

MIT License

+ +

SPDX identifier

+
MIT
+ +

License text

+ +
+

MIT License

+ +
+
+

Copyright (c) <year> <copyright holders> +

+ +
+ +

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 + (including the next paragraph) + 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.

+ + + + + + +

SPDX web page

+ + +

Notice

+

This license content is provided by the SPDX project. For more information about licenses.nuget.org, see our documentation. + +

Data pulled from spdx/license-list-data on February 9, 2023.

+
+ + diff --git a/src/ObjectValidation/ObjectValidation licenses/README.md b/src/ObjectValidation/ObjectValidation licenses/README.md new file mode 100644 index 0000000..ed785ba --- /dev/null +++ b/src/ObjectValidation/ObjectValidation licenses/README.md @@ -0,0 +1,28 @@ +# 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 referenced libraries + +The published `ObjectValidation` library uses the following referenced open +source libraries: + +| Library | License | +| ------- | ------- | +| [`Microsoft.Extensions.Options`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) | + +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.Primitives`](https://dot.net/) | [MIT](https://licenses.nuget.org/MIT) | diff --git a/src/ObjectValidation/ObjectValidation.csproj b/src/ObjectValidation/ObjectValidation.csproj index 28faa28..af765d0 100644 --- a/src/ObjectValidation/ObjectValidation.csproj +++ b/src/ObjectValidation/ObjectValidation.csproj @@ -22,10 +22,11 @@ LICENSE True README.md - 2.5.0 + 2.6.0 embedded true Debug;Release;Trunk + True @@ -38,6 +39,21 @@ True \
+ + Always + + + Always + + + Always + + + Always + + + Always + True \ diff --git a/src/ObjectValidation/RequiredIfAttribute.cs b/src/ObjectValidation/RequiredIfAttribute.cs index bef90a8..e691737 100644 --- a/src/ObjectValidation/RequiredIfAttribute.cs +++ b/src/ObjectValidation/RequiredIfAttribute.cs @@ -12,6 +12,7 @@ namespace wan24.ObjectValidation /// Checked property name /// Values (one of the value is required in order to match this condition; if not given, the value is required if the checked property has a non- /// value) + [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public class RequiredIfAttribute(string propertyName, params object?[] values) : RequiredAttribute() { /// diff --git a/src/ObjectValidation/ValidationHelper.cs b/src/ObjectValidation/ValidationHelper.cs new file mode 100644 index 0000000..a699ef6 --- /dev/null +++ b/src/ObjectValidation/ValidationHelper.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace wan24.ObjectValidation +{ + /// + /// Object validation helper + /// + public static class ValidationHelper + { + /// + /// Create a validation result + /// + /// Error message + /// Context + /// + public static ValidationResult CreateValidationResult(in string message, in ValidationContext validationContext) + => new( + validationContext.MemberName is null + ? message + : $"{validationContext.MemberName}: {message}", + validationContext.MemberName is null ? null : new string[] { validationContext.MemberName } + ); + } +}