I am using jquery validate and it was working normally, now it is returning the following error, I checked the references, I changed, but it continues with the same problem:
Uncaught TypeError: $ (...). Validate is not a function
<script type="text/javascript" src="/javascript/jquery-3.1.1.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/mobile/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/css/mobile/bootstrap-theme.min.css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><linkrel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/style2.css" />
<link rel="shortcut icon" href="/images/iconepagina.ico">
<script src="/javascript/validacao.js"></script>
<link rel="stylesheet" href="/css/mobile/validacao.css" />
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"></script><scriptsrc="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.js"></script>
And here is my validation.js
$(document).ready(function() {
$('#contact-form').validate({
rules: {
txtNome: {
minlength: 2,
required: true
}
},
highlight: function(element) {
$(element).closest('.control-group').removeClass('success').addClass('error');
},
success: function(element) {
element.text('OK!').addClass('valid')
.closest('.control-group').removeClass('error').addClass('success');
}
});
});
Every way I refer to, the same error remains.
Here's how the console error is:
jquery_master.min.js: 3 Uncaught TypeError: $ (...). validate is not a function at HTMLDocument. (validation.js: 44) at j (jquery_master.min.js: 3) at k (jquery_master.min.js: 3)
And here's how the references are now:
<script type="text/javascript" src="/javascript/jquery-3.1.1.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/mobile/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/css/mobile/bootstrap-theme.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/style2.css" />
<link rel="shortcut icon" href="/images/iconepagina.ico">
<script src="/javascript/jquery_master.min.js"></script>
<link rel="stylesheet" href="/css/mobile/validacao.css" />
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"></script><scriptsrc="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.0/additional-methods.js"></script>
<script src="/javascript/validacao.js"></script>
All changes I make, no back to work the validate.