Validate
in Using jQuery Plugins
•
8 years ago
Hi!
I created my project in VS with MVC4.
In _layout.cshtml file I added:
<
script
src
="~/Scripts/jquery.validate.min.js"></
script
>
<
script
src
="~/Scripts/jquery.validate.unobtrusive.min.js"></
script
>
and it worked smooth.
Then I updated the whole project via NUGET and got something
like.
- jquery 2.1.3(?)
- jquery.validation 1.13.X
-
MVC 5.X.X
... all the latest.
(I don't have the project
in front of me, so the versions might be slightly wrong.)
If I
remove validation scripts the project works fine.
But when I include the scripts above the validation stops
working with a crash in script --> "Unable to get property '
call' of undefined or
null reference".
I solved it by adding jquery migrate script just before the two script lines above.
And now the question:
For me this jquery.migrate is just a work around? I want the
1.13 version of jquery validation to use the correct version of jquery
(I assume that's the problem that migrate solve?).
Where in
my VS project do I change that? So I can remove the jquery.migrate
script and have it more "native" without that work around?
So that jquery.validation actually is using the latest jquery, but
without jquery.migrate?
Or is migrate always needed?
OR, do I missunderstand the problem and usage of "migrate"?
br
/Marcus
1