Validate the contents of File Inputs before submission.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
css Adding file protocol warning. Jul 20, 2011
highlighting Initial commit Jul 20, 2011
images Initial commit Jul 20, 2011
js Fix documentation Jul 21, 2011
test Initial commit Jul 20, 2011
.gitignore ignore .DS_Store Jul 20, 2011
.nojekyll skip jekyll Jul 20, 2011
index.html Point links to github. Jul 20, 2011
readme.markdown adding readme for github. Jul 20, 2011


jQuery File Validation

Uploading files, only to find that they are too large, or the wrong type is frustrating. The fileValidator plugin lets you warn users before they start uploading enormous files.


Simply select the file inputs you wish to validate, and pass in a callbacks to handle invalid files.

$( el ).fileValidator({
  onValidation: function(files){ /* Called once before validating files */ },
  onInvalid:    function(validationType, file){ /* Called once for each invalid file */ },
  maxSize:      '2m', //optional
  type:         'image' //optional

See for more information.