@@ -9,6 +9,7 @@ Change Log: `bootstrap-fileinput`
- (bug #1551): Correct MIME Type detection for PNG.
- (enh #1548): Correct `filebatchselected` trigger for single file uploads.
- (enh #1545, #1546): Enhance file path for folder drag.
+- (enh #1540): Better validation of `required` property.
- (bug #1518, #1522): Initial preview rendering correction when preview returned by server immediately after upload.
## version 5.0.8
@@ -4740,6 +4740,9 @@
},
_isFileSelectionValid: function (cnt) {
var self = this;
+ if (self.isDisabled) {
+ return true;
+ }
cnt = cnt || 0;
if (self.required && !self.getFilesCount()) {
self.$errorContainer.html('');
@@ -5305,7 +5308,7 @@
upload: function () {
var self = this, fm = self.fileManager, totLen = fm.count(), i, outData,
hasExtraData = !$.isEmptyObject(self._getExtraData());
- if (!self.isAjaxUpload || self.isDisabled || !self._isFileSelectionValid(totLen)) {
+ if (!self.isAjaxUpload || !self._isFileSelectionValid(totLen)) {
return;
}
self.lastProgress = 0;