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
Design a better client side validation experience #8573
Comments
@ryanbrandenburg can you please investigate and come up with some cost for this work? Thanks! |
@danroth27 seems we rely on jQuery for our validation too, it's not just transitive because of Bootstrap dependency. |
@mkArtakMSFT Right, the main work item tracked by this issue is investigating what it would take to remove the jQuery dependency from our validation support. |
Given that our current validation support is built on jQuery validation, the way I would think about this issue is to take a fresh look at what our client validation support should look like. Is there a different validation library that we should consider using? Etc. |
The one option that seems to be most popular (and standards compliant) would be using the built-in HTML5 form validation. The problem there is that it would only work for client-side validation. As far as I can tell HTML5 form validation doesn't solve any server-side validation problems, and even if it did it would require a lot of changes to DataAnnotations. HTML5 also isn't supported on older browsers (IE9 was the example I found). In my opinion it's not worth the work that would be required to remove our dependencies here in the absence of a more unified vision about what value we can produce from re-working DataAnnotations. |
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. |
Moving this out of 6.0. The initial thought was that we could do something tactical building upon either browser features such as constraint validation or hand rolling a facsimile of jQuery.validation. But on further inspection, we realize that an alternative that simply removes jquery does not move the needle enough for us invest in.
Offline notesI think we need to start by defining the goals here, for me those are:
|
@pranavkm your link to https://github.com/aspnet/specs/blob/main/notes/RemoveJQueryUnobtrusiveValidation.md is invalid |
Sorry @Andrzej-W that repo is non-public, but I've updated my comment with details about what we would want from a re-design. |
@pranavkm Thanks for posting those notes. I am eager to see what you can come up with in a future version |
#8573 (comment) covers the problem statement for this issue
Bootstrap 5 is removing it's dependency on jQuery: twbs/bootstrap#23586
This issue tracks investigating what removing jQuery as a dependency from ASP.NET Core would take.
We're going to split this work into two phases:
The text was updated successfully, but these errors were encountered: