jquery validate not loaded requirejs
问题 I have a main module in RequireJS: require([ 'jquery', 'jquery.validate', 'jquery.validate.unobtrusive' ], function ($) { $(document).ready(function () { var validator = $("form").validate(); if ($("#txtFirstName").val() !== "") validator.element("#txtFirstName"); }); }); When I load this page, I get a JavaScript error: TypeError: $(...).validate is not a function var validator = $("form").validate();** I don't now why? All scripts are loaded: 回答1: You'll need to configure shim to "wire" the