Replace archived Blazored.FluentValidation with Blazilla - #935
Open
sfmskywalker with Copilot wants to merge 4 commits into
Open
Replace archived Blazored.FluentValidation with Blazilla#935sfmskywalker with Copilot wants to merge 4 commits into
sfmskywalker with Copilot wants to merge 4 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix Blazored.FluentValidation dependency issue
Replace archived Blazored.FluentValidation with Blazilla
Aug 3, 2026
sfmskywalker
marked this pull request as ready for review
August 20, 2026 23:22
Contributor
|
PR author is not in the allowed authors list. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Suppressed comments (1)
src/modules/Elsa.Studio.Workflows/Components/WorkflowDefinitionEditor/Components/WorkflowProperties/Tabs/Properties/Sections/Metadata/Metadata.razor:10
- Once this component supplies its validator,
AsyncModestill cannot be paired with the existingOnValidSubmit: Blazor decides to invoke that callback before Blazilla's async uniqueness task completes. A native submit can then updateWorkflowDefinitionbefore the duplicate-name result arrives. Route the form throughOnSubmit="ValidateForm"(or an equivalent handler that awaitsValidateAsync) instead.
<FluentValidator Validator="_validator" AsyncMode="true"/>
| <DialogContent> | ||
| <EditForm EditContext="_editContext" OnValidSubmit="OnValidSubmit"> | ||
| <FluentValidationValidator @ref="_fluentValidationValidator" Validator="_validator" DisableAssemblyScanning="true"/> | ||
| <FluentValidator Validator="_validator" AsyncMode="true"/> |
| <DialogContent> | ||
| <EditForm EditContext="_editContext" OnValidSubmit="OnValidSubmit"> | ||
| <FluentValidationValidator @ref="_fluentValidationValidator" Validator="_validator" DisableAssemblyScanning="true"/> | ||
| <FluentValidator Validator="_validator" AsyncMode="true"/> |
| <MudText Typo="Typo.overline">@Localizer["Metadata"]</MudText> | ||
| <EditForm EditContext="@_editContext" OnValidSubmit="OnValidSubmit"> | ||
| <FluentValidationValidator @ref="_fluentValidationValidator" Validator="_validator"/> | ||
| <FluentValidator Validator="_validator" AsyncMode="true"/> |
| private async Task ValidateForm() | ||
| { | ||
| if (!await _fluentValidationValidator.ValidateAsync()) | ||
| if (!await _editContext.ValidateAsync()) |
This was referenced Sep 7, 2026
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.
Purpose
Remove the archived, unlisted
Blazored.FluentValidationdependency from Studio core and migrate the affected forms to a maintained FluentValidation Blazor wrapper. This also resolves the transitive restore risk for downstream consumers.Scope
Select one primary concern:
Description
Problem
Elsa.Studio.CoreexposedBlazored.FluentValidationtransitively even though the package is unlisted and upstream is archived. Consumers inherit an effectively unfixable deprecated dependency and may fail restore in environments that disallow unlisted packages.Solution
Dependency swap
Blazored.FluentValidationwithBlazillain core package references.Form integration update
FluentValidationValidatortoFluentValidator.EditContext.ValidateAsync().Async validator correctness
AsyncMode="true"on forms backed by validators with async rules so existing uniqueness checks continue to run asynchronously.Central package alignment
Microsoft.AspNetCore.Components*andMicrosoft.JSInteroppatch versions to satisfy the new wrapper’s minimum requirements and avoid NU1605 downgrades.Focused coverage
Example migration:
Verification
Steps:
Directory.Packages.propsandsrc/framework/Elsa.Studio.Core/Elsa.Studio.Core.csprojto confirmBlazored.FluentValidationis removed andBlazillais used instead.FluentValidatorandEditContext.ValidateAsync(), withAsyncMode="true"only where async rules exist.src/modules/Elsa.Studio.Workflows.Tests/FluentValidationValidatorTests.csfor coverage of validation message behavior.Expected outcome:
No project in the change set references
Blazored.FluentValidation; affected forms continue using FluentValidation throughBlazilla; central package versions remain restore-compatible.Screenshots / Recordings (if applicable)
Commit Convention
We recommend using conventional commit prefixes:
fix:– Bug fixes (behavior change)feat:– New featuresrefactor:– Code changes without behavior changedocs:– Documentation updateschore:– Maintenance, tooling, or dependency updatestest:– Test additions or modificationsClear commit messages make reviews easier and history more meaningful.
Checklist