umbraco/Umbraco.Forms.Issues

Documentation doesn't mention the use of aspnet-validation package...

Opened this issue · 0 comments

https://docs.umbraco.com/umbraco-forms/developer/prepping-frontend

As a long term user of forms where we had to use jquery/validation/unobtrusivevalidation in the past the docs still read as though this was required.

In fact if you do want to use jquery then you have to not include @Html.RenderUmbracoFormDependencies(url) as this includes the aspnet-validation.js file and the umbraco-forms.js checks for if (void 0 !== window.aspnetValidation) { } else { // see if we have jquery setup instead}

There is another issue in that if the user has already decided to use aspnet-validation.js for custom non umbraco forms then depending on versions.. (or using the original https://github.com/ryanelian/aspnet-validation for instance) results in a javascript error a.ValidateForm() doesn't exist.) Possibly edge case...

Indeed if the user wanted to use smidge to bundle aspnet-validation scripts into a predefined bundle, I'm not sure we have the same facility as used to be the case with cdf in umbraco 8 having support for forms dependancies?

Could the documentation be extended to highlight that aspnet-validation is being used, and how to defer properly to jquery if required, or indeed adding dependencies to an existing sitewide bundle?