the following code: script code
<script type="text/javascript">
$(document).ready(function() {
$("#formElem").validate({
rules: {
dimage:{
minlength:200
}
},
messages: {
dimage:{
required: 'Please select the image!'
} ,
}
});
});
</script>
html code
<form id="formElem" name="formElem" action="" method="post">
<input type="file" name="dimage" id="dimage" />
</form>
I'm using jquery validate.js file for client side validation. when i create a file with above code it's not showing any error message.
How should i alert the error message when the user not selected the file?