Skip to content
Open
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
10 changes: 3 additions & 7 deletions aspnetcore/blazor/forms/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2625,10 +2625,6 @@ public class ShipDescription

## Use validation models from a different assembly

<!-- UPDATE 11.0 - The first list item changes when the content
is updated for plain class libs upon
experimental status dropping at 11.0 -->

For model validation defined in a different assembly, such as a library or the `.Client` project of a Blazor Web App:

* If the library is a plain class library (it isn't based on the `Microsoft.NET.Sdk.Web` or `Microsoft.NET.Sdk.Razor` SDKs), add a package reference to the library for the [`Microsoft.Extensions.Validation` NuGet package](https://www.nuget.org/packages/Microsoft.Extensions.Validation). Additional steps are required for plain class libraries, which are described later in this section.
Expand Down Expand Up @@ -2665,9 +2661,9 @@ builder.Services.AddValidationForTypesInClient();
builder.Services.AddValidation();
```

<!-- UPDATE 11.0 - The following changes when the content
is updated for plain class libs upon
experimental status dropping at 11.0 -->
:::moniker-end

:::moniker range="= aspnetcore-10.0"

The new attributes from the `Microsoft.Extensions.Validation` package (<xref:Microsoft.Extensions.Validation.ValidatableTypeAttribute> and <xref:Microsoft.Extensions.Validation.SkipValidationAttribute>) are published as *experimental* in .NET 10. The package is intended to provide a new shared infrastructure for validation features across frameworks, and publishing experimental types provides greater flexibility for the final design of the public API for better support in consuming frameworks.

Expand Down
Loading