我有一个完整的验证码
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery("#commentform").validate({
rules: {
author: "required",
email: {
required: true,
email: true
},
comment: "required"
},
messages: {
author: "Author name required",
email: "Email required",
comment: "Comment required"
}
});
});
</script>
运行代码时,我在控制台中收到错误消息
TypeError: jQuery(...).validate is not a function
这不是功能吗?