@bnsights/bbsf-controls 1.2.31 → 1.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -400,6 +400,10 @@ If the issue persists, consider using a different HTML editor component that's c
400
400
 
401
401
  ## Change Log
402
402
 
403
+ ## 1.2.32 / 19-08-2026
404
+ =====================
405
+ - Update file upload validations
406
+
403
407
  ## 1.2.31 / 09-08-2026
404
408
  =====================
405
409
  - Update tags input option where not actionUrl
@@ -7748,13 +7748,23 @@ class FileUploadComponent {
7748
7748
  this.validationMessage = this.validationMessage + `${this.resolveLabel(this.options.acceptLbl, 'Extensions')} (${acceptTypesText}) `;
7749
7749
  }
7750
7750
  if (this.options.fileMaxSizeInMB > 0) {
7751
- this.validationMessage = this.validationMessage + `<br /> ${this.resolveLabel(this.options.maxFileSizeLbl, 'FileMaxSizeInMB') + this.options.fileMaxSizeInMB + ' ' + this.UtilityService.getResourceValue('MB')}`;
7751
+ this.validationMessage = this.validationMessage + `<br /> ${this.resolveLabel(this.options.maxFileSizeLbl, 'FileMaxSizeInMB') + ' ' + this.options.fileMaxSizeInMB + ' ' + this.UtilityService.getResourceValue('MB')}`;
7752
7752
  }
7753
+ // File count validations
7754
+ let fileCountValidation = '';
7753
7755
  if (this.options.minNoOfFiles > 0) {
7754
- this.validationMessage = this.validationMessage + `<br /> ${this.UtilityService.getResourceValue('MinFileCountValidationKey') + ' ' + this.options.minNoOfFiles}`;
7756
+ fileCountValidation =
7757
+ this.resolveLabel(this.options.minFileCountLbl, 'MinFileCountValidationKey') + ' ' + this.options.minNoOfFiles;
7755
7758
  }
7756
7759
  if (this.options.maxNoOfFiles > 0) {
7757
- this.validationMessage = this.validationMessage + `<br /> ${this.resolveLabel(this.options.maxFileCountLbl, 'MaxFileCountValidationKey') + this.options.maxNoOfFiles}`;
7760
+ const maxFileCountValidation = this.resolveLabel(this.options.maxFileCountLbl, 'MaxFileCountValidationKey') + ' ' + this.options.maxNoOfFiles;
7761
+ fileCountValidation = fileCountValidation
7762
+ ? `${fileCountValidation}, ${maxFileCountValidation}`
7763
+ : maxFileCountValidation;
7764
+ }
7765
+ // Add file count validation as one line
7766
+ if (fileCountValidation) {
7767
+ this.validationMessage += `<br /> ${fileCountValidation}`;
7758
7768
  }
7759
7769
  if (this.options.maxSizeForAllFilesInMB > 0 && this.options.maxSumFilesSizeLbl && this.options.maxSumFilesSizeLbl.trim().length > 0) {
7760
7770
  this.validationMessage = this.validationMessage + `<br /> ${this.options.maxSumFilesSizeLbl + ' ' + this.options.maxSizeForAllFilesInMB + ' ' + this.UtilityService.getResourceValue('MB')}`;