Posted By

erraja_07 on 03/18/11


Tagged


Versions (?)

JQuery Image File Validation


 / Published in: JavaScript
 

  1. /**** VALIDATE IMAGE ***/
  2. function validateImageFile(fld_value) {
  3. if(!/(\.bmp|\.gif|\.jpg|\.jpeg)$/i.test(fld_value)) {
  4. //alert("Invalid image file type.");
  5. //fld.form.reset();
  6. //fld.focus();
  7. return false;
  8. }
  9. return true;
  10. }

Report this snippet  

You need to login to post a comment.