PHP Classes

File: public/asset/vendor/jquery-validation/src/additional/maxsize.js

Recommend this page to a friend!
  Classes of fathurrahman   mnTemplate   public/asset/vendor/jquery-validation/src/additional/maxsize.js   Download  
File: public/asset/vendor/jquery-validation/src/additional/maxsize.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: mnTemplate
Route HTTP requests to callback functions
Author: By
Last change:
Date: 1 year ago
Size: 502 bytes
 

Contents

Class file image Download
// Limit the size of each individual file in a FileList. $.validator.addMethod( "maxsize", function( value, element, param ) { if ( this.optional( element ) ) { return true; } if ( $( element ).attr( "type" ) === "file" ) { if ( element.files && element.files.length ) { for ( var i = 0; i < element.files.length; i++ ) { if ( element.files[ i ].size > param ) { return false; } } } } return true; }, $.validator.format( "File size must not exceed {0} bytes each." ) );