Jquery validation plugin - TypeError: $(…).validate is not a function

后端 未结 8 1125
不知归路
不知归路 2020-12-01 08:45

My script throw errors:

TypeError: jQuery.validator is undefined additional-methods.js:20 TypeError: $(...).validate is not a function index.php:115

8条回答
  •  盖世英雄少女心
    2020-12-01 09:39

    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)

提交回复
热议问题