Skip to content

Create server rendered forms with client validation using Blazor without a circuit #51040

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

Open
danroth27 opened this issue Sep 30, 2023 · 11 comments
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-form-validation This issue is related to forms validation in Blazor Pillar: Complete Blazor Web
Milestone

Comments

@danroth27
Copy link
Member

MVC & Razor Pages support creating server rendered forms with client validation where the client validation is based on data annotations and then implemented with framework provided client-side JavaScript using unobtrusive validation.

With Blazor in .NET 8 we can now create server rendered forms that are rendered statically and support server validation based on data annotations. But if you want client validation then you need to enable server interactivity, which means creating a circuit and handling the additional server load.

This issue tracks discussing if we need a way to do client validation in Blazor without using Blazor Server or Blazor WebAssembly.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Sep 30, 2023
@danroth27
Copy link
Member Author

@DamianEdwards

@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Oct 2, 2023
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Oct 2, 2023
@ghost
Copy link

ghost commented Oct 2, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost
Copy link

ghost commented Dec 20, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the feature-blazor-form-validation This issue is related to forms validation in Blazor label Dec 20, 2023
@mkArtakMSFT mkArtakMSFT added the Priority:2 Work that is important, but not critical for the release label Jan 16, 2024
@julioct
Copy link

julioct commented Jun 3, 2024

Hi @danroth27, any chance this gets implemented in .NET 9?

@danroth27
Copy link
Member Author

Hi @danroth27, any chance this gets implemented in .NET 9?

This feature is not currently planned for .NET 9. You can see our roadmap of what we're planning to deliver for .NET 9 here: https://aka.ms/aspnet/roadmap. If folks in the community are interested in driving this feature forward sooner, we of course welcome the contribution.

@julioct
Copy link

julioct commented Jun 3, 2024

Thank you, @danroth27. Is there any example available to implement this manually, perhaps with JavaScript?

I don't really like having to switch my pure Static SSR site to Interactive SSR just to get this behavior.

@boirr
Copy link

boirr commented Jan 10, 2025

@danroth27 Will this be implemented in .NET 10? It sounds amazing and I wish I had engineering skills to contribute.

@danroth27
Copy link
Member Author

danroth27 commented Jan 10, 2025

@boirr This issue is currently in our Backlog. Issues that we're actively considering for .NET 10 are in the .NET 10 Planning milestone. Note that .NET 10 planning is still in progress, so nothing is committed yet and plans are always subject to change.

If this feature is important to you, you can signal support by giving a 👍 reaction on the original issue post.

@boirr
Copy link

boirr commented Jan 21, 2025

Thank you, @danroth27. Is there any example available to implement this manually, perhaps with JavaScript?

I don't really like having to switch my pure Static SSR site to Interactive SSR just to get this behavior.

I am commenting to start a discussion on this^

I found this on GitHub: https://git.1-hub.cnhaacked/aspnet-client-validation/
Does this help with client side validation without using SignalR?

Thanks!

@danroth27 danroth27 removed the Priority:2 Work that is important, but not critical for the release label Feb 5, 2025
@paritoshromy
Copy link

Can this be linked to https://git.1-hub.cndotnet/aspnetcore/issues/28640 and worked together?

@boirr
Copy link

boirr commented Feb 13, 2025

Can this be linked to https://git.1-hub.cndotnet/aspnetcore/issues/28640 and worked together?

Your link is not working. Here is the URL:

#28640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-form-validation This issue is related to forms validation in Blazor Pillar: Complete Blazor Web
Projects
None yet
Development

No branches or pull requests

6 participants