- Thu Nov 21, 2019 7:44 am
#826975
I am trying to make file upload field mandatory using Javascript, i am trying the following code but it's not validating:
Code: Select all
Can someone help me with that ?function validate(){
if($('#VATCertificate')[0].files.length === 0){
alert("Attachment Required");
$('#VATCertificate').focus();
return false;
}
}