1
I’m trying to validate a input
of the kind file
with Jquery Validation.
Following the documentation, I do the following: My input:
<input class="form-control" id="ImagemUpload" name="ImagemUpload" type="file" value="">
and my script:
$("#ImagemUpload").rules("add", {
accept: "image/jpeg, image/pjpeg",
messages: {
accept: "Formato inválido."
}
});
However, it is not validating and the following message is showing up on the console:
Uncaught Typeerror: Cannot read Property 'call' of Undefined
Can you do a jsFiddle with the problem? So we can test and help better. There are many validation plugins. It’s hard to know which one you’re using...
– Sergio
I am using http://jqueryvalidation.org/
– Rod