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.15k stars 9.92k forks source link

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

Open danroth27 opened 11 months ago

danroth27 commented 11 months 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 11 months ago

@DamianEdwards

ghost commented 11 months 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 8 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 3 months ago

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

danroth27 commented 3 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 3 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.