FluentValidation validators: migrate the sample into CodeMazeGuides on net10.0 - #2145
Open
vladimir-pecanac-main wants to merge 1 commit into
Conversation
…n net10.0 Moves the sample for 'FluentValidation Validators in C#: Built-in and Custom' out of the standalone CodeMazeBlog/fluent-validation-aspnetcore repository and into dotnet-client-libraries/FluentValidationValidators, so the per-article CI gate builds and tests it like every other sample. - netcoreapp3.1 -> net10.0 for both projects; FluentValidation 9.0.1 -> 12.1.1. - Startup.cs and the generic host replaced by minimal hosting in Program.cs. - CascadeMode.StopOnFirstFailure -> CascadeMode.Stop. The old member is removed in 12.x, not deprecated, so the original line no longer compiles. - FluentValidation.AspNetCore dropped: it stops at 11.3.1 and cannot pair with core 12.1.1, and its automatic-validation pipeline is the approach the maintainers no longer recommend for new projects. Validators are registered with AddValidatorsFromAssemblyContaining() and invoked explicitly in OrdersController. - New Tests project (MSTest) covering the custom FullName() message, cascade behaviour, IsInEnum(), RuleForEach() indexing, and the exact strings EmailAddress() accepts and rejects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the sample for FluentValidation Validators in C#: Built-in and Custom out of the standalone
CodeMazeBlog/fluent-validation-aspnetcorerepository (branchfluent-validation-validators-deep-dive) and intodotnet-client-libraries/FluentValidationValidators, so the per-article CI gate builds and tests it.netcoreapp3.1->net10.0for both projects; FluentValidation 9.0.1 -> 12.1.1.Startup.csand the generic host replaced by minimal hosting inProgram.cs.CascadeMode.StopOnFirstFailure->CascadeMode.Stop. The old member is removed in 12.x, not deprecated, so the original line is a hardCS0117.FluentValidation.AspNetCoredropped: it stops at 11.3.1 with no 12.x, so it cannot pair with core 12.1.1, and its automatic-validation pipeline is the approach the maintainers no longer recommend for new projects. Validators are registered withAddValidatorsFromAssemblyContaining()and invoked explicitly inOrdersController.Testsproject (MSTest) covering the customFullName()message, cascade behaviour,IsInEnum(),RuleForEach()indexing, and the exact stringsEmailAddress()accepts and rejects.dotnet build0 warnings 0 errors,dotnet test13/13 on SDK 10.0.302 / runtime 10.0.10.