dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.48k stars 10.03k forks source link

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

Open danroth27 opened 1 year ago

danroth27 commented 1 year ago

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.

danroth27 commented 1 year ago

@DamianEdwards

ghost commented 1 year ago

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 commented 10 months ago

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.

julioct commented 5 months ago

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

danroth27 commented 5 months ago

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 commented 5 months ago

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.