Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Validate the contents of File Inputs before submission.
branch: master
Failed to load latest commit information.
css Adding file protocol warning.
highlighting Initial commit
images Initial commit
js Fix documentation
test Initial commit
.gitignore ignore .DS_Store
.nojekyll skip jekyll
index.html Point links to github.
readme.markdown adding readme for github.


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.

Something went wrong with that request. Please try again.