Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.1 #2

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
type: string
description: The version of the library
required: true
default: 1.0.0
default: 1.0.1
VersionSuffix:
type: string
description: The version suffix of the library (for example rc.1)
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# PosInformatique.FluentValidation.Json
[PosInformatique.FluentValidation.Json](https://www.nuget.org/packages/PosInformatique.FluentValidation.Json/)
is a library based on FluentValidation to validate JSON objects for the Web API.
is a library based on [FluentValidation](https://docs.fluentvalidation.net/) to validate JSON objects for the Web API.

By default, when using the [FluentValidation](https://www.nuget.org/packages/FluentValidation)
[![NuGet](https://img.shields.io/nuget/v/PosInformatique.FluentValidation.Json?label=PosInformatique.FluentValidation.Json)](https://www.nuget.org/packages/PosInformatique.FluentValidation.Json/)

By default, when using the [FluentValidation](https://docs.fluentvalidation.net/)
library to validate an object, the property name (or related display name) are used in the error message.
This can be useful for functional validation to display to users on the views of the application.

Expand Down Expand Up @@ -41,7 +43,7 @@ public class Product
```

If you want to validate the C# `Product` class, you have to create a validator
which inherit from the `AbstractValidator<T>` class.
which inherit from the `AbstractValidator<T>` class of [FluentValidation](https://docs.fluentvalidation.net/) library.

```csharp
public class ProductValidator : AbstractValidator<Product>
Expand Down Expand Up @@ -159,7 +161,7 @@ Next, you use your own validation strategy depending of the context usage.
For example, if you ASP .NET Core to create an Web API, you can use the following code
and returns an error as JSON problem format:

```json
```csharp
[ApiController]
[Route("[controller]")]
public class ProductController : ControllerBase
Expand Down
3 changes: 3 additions & 0 deletions src/FluentValidation.Json/FluentValidation.Json.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<PackageProjectUrl>https://github.com/PosInformatique/PosInformatique.FluentValidation.Json</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
1.0.1
- Fix the documentation

1.0.0
- Initial version
</PackageReleaseNotes>
Expand Down
Loading