My script throw errors:
TypeError: jQuery.validator is undefined additional-methods.js:20 TypeError: $(...).validate is not a function index.php:115
It looks like the JavaScript error your getting is probably being caused by
password: {
required:true,
rangelenght:[4.20]
},
As the [4.20]
should be [4,20]
, which i'd guess is throwing off the validation code in additional-methods
hence giving the type error's you posted.
Edit: As others have noted in the below comments rangelenght
is also misspelled & jquery.validate.js
library appears to be missing (assuming its not compiled in to one of your other assets)
for me, the problem was from require('jquery-validation')
i added in the begging of that js file which Validate method used which is necessary as an npm module
unfortunately, when web pack compiles the js files, they aren't in order, so that the validate method is before defining it! and the error comes
so better to use another js file for compiling this library or use local validate method file or even using CDN but in all cases make sure you attached jquery before