Skip to content

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

@mistyn8

Description

@mistyn8

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions