JQuery Validate Video File


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function validateVideoFileExtension(fld_value) {
  2. if(!/(\.flv|\.avi|\.mov|\.mpg|\.wmv|\.m4v|\.mp3|\.wma|\.3gp)$/i.test(fld_value)) {
  3. //alert("Invalid image file type.");
  4. //fld.form.reset();
  5. //fld.focus();
  6. return false;
  7. }
  8. return true;
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.