jquery-validation / jquery-validation

jQuery Validation Plugin library sources

Home Page:https://jqueryvalidation.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NuGet jQuery version dependency incorrect

austindorsey opened this issue · comments

Your environment

  • Version of jquery-validate: v1.19.5
  • Browser name and version: Chrome 112.0.5615.138

Current behavior

The jQuery version dependency that NuGet has is >= 1.4.4 instead of >= 1.7.2 which is listed in bower.json.
https://www.nuget.org/packages/jquery.validation#dependencies-body-tab

Error caused:
Uncaught TypeError: $(...).on is not a function

Expected behavior

jQuery version dependency in NuGet should be at least >= 1.7 as $(...).on was added in jQuery 1.7 - https://api.jquery.com/on/

Live demo

https://jsbin.com/wofivuheze/edit?html,console,output

commented

I'm not sure what can be done here. https://github.com/jquery-validation/jquery-validation/blob/master/bower.json is correct. Presumably one of the people listed as owners needs to manually correct it.

I concur, and I'd add that it's odd to use NuGet for a JavaScript library. The better tool in that case is https://github.com/aspnet/LibraryManager.

Yeah, I hear you. It's a legacy application and NuGet is what it was using. I was just updating dependencies and everything broke because it didn't update jQuery as well, so thought I would mention it.