Permalink
Browse files

Fix documentation

  • Loading branch information...
1 parent 4cf699f commit 0f4ccfca5512341e0f9893dcc7f520bd32afc229 @adamsanderson committed Jul 21, 2011
Showing with 14 additions and 11 deletions.
  1. +14 −11 js/file-validator.js
View
@@ -1,20 +1,23 @@
/**
-Manages file events for an element.
-Will emit a `filesadded` event with the following data:
- {
- files: [files]
- }
+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.
+
+Usage
+-----
-Options:
-hoverClassName: CSS class added to the element when a file is dragged over the
- element.
+Simply select the file inputs you wish to validate, and pass in a callbacks to handle invalid files.
-Usage:
- $(el).fileLoader({
- // options
+ $( el ).fileValidator({
+ onValidation: function(files){ ... },
+ onInvalid: function(validationType, file){ ... },
+ maxSize: '2m', //optional
+ type: 'image' //optional
});
+
+
*/
(function($){

0 comments on commit 0f4ccfc

Please sign in to comment.