Código HTML:
 <input name="archivo[]" id="archfi" type="file" onChange='load_image(this.id,this.value)'/> 
Código:
  
function load_image(id,ext)
{
 if(validateExtension(ext) == false)
 {
  alert("Unicamente es permitido archivos PDF");
  document.getElementById("fileInput").innerHTML = "<input id='file' type='file' onChange='load_image(this.id,this.value)'>";
   document.getElementById("file").focus();
  return;
  }
 }
 
function validateExtension(v)
{
 var allowedExtensions = new Array("pdf");
 for(var ct=0;ct<allowedExtensions.length;ct++)
 {
  sample = v.lastIndexOf(allowedExtensions[ct]);
  if(sample != -1){return true;}
  }
 return false;
 }
saludos!
 
 
 Si no cumple limpiar campo
 Si no cumple limpiar campo  
 

