I have included jQuery validate for my site for uploading advertisement file.. I don\'t know why but this is not working.
HTML file is as following:
I think you don't included jQuery
and validate
libraries because it works fine when you add them in your header
$().ready(function(){
$("#formToPushAd").validate({
rules:{
file:{
required:true
},
adUrl:{
required:true,
url:true
},
datepicker1:{
required:true,
date:true
},
datepicker2:{
required:true,
date:true,
}
},
messages:{
file:{
required:"Please Select a frequency"
},
adUrl:{
required:"Please enter ad url"
},
datepicker1:{
required:"Please Enter a date",
date:"Please Enter a valid date"
},
datepicker2:{
required:"Please Enter a date",
date:"Please Enter a valid date"
}
}
})
});