title: How to restrict file upload using allowTypes attribute of p:fileUpload in primefaces?
body: <p>I am new to <code>Primefaces</code>. </p>
  
  <p>I need to restrict some file formats like <code>. pdf</code> and <code>. png</code>, other than those I need to allow to upload using <code>p:fileUpload</code> component in <code>Primefaces</code>. </p>
  
  <p>I already tried some way like <code>allowTypes="/(\.|\/)(?!(pdf|png))$/"</code> but its not working.</p>
  
  <p>Any idea to do this?</p>