@churchillliving/se-ui-toolkit 6.53.73 → 6.53.74

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.
@@ -4586,12 +4586,18 @@
4586
4586
  // check the validation of the field
4587
4587
  GridComponent.prototype.gridValidation = function (columns, row) {
4588
4588
  if (!this.gridService.checkValidity(columns, row)) {
4589
+ var errorMessageDetails_1 = '';
4590
+ columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
4591
+ if (column.errorMessage) {
4592
+ errorMessageDetails_1 = errorMessageDetails_1 ? errorMessageDetails_1 + ' , ' + column.errorMessage : column.errorMessage;
4593
+ }
4594
+ });
4589
4595
  var isRequired = columns.some(function (column) { return column.errorMessage && !row[column.field]; });
4590
4596
  if (isRequired) {
4591
- this.alertService.error('Required fields are missing', 'REQUIRED FIELD');
4597
+ this.alertService.error(errorMessageDetails_1, 'REQUIRED FIELD');
4592
4598
  }
4593
4599
  else {
4594
- this.alertService.error('Some fields are invalid', 'INVALID FIELD');
4600
+ this.alertService.error(errorMessageDetails_1, 'INVALID FIELD');
4595
4601
  }
4596
4602
  return false;
4597
4603
  }
@@ -6452,14 +6458,20 @@
6452
6458
  var validity = true;
6453
6459
  var errorMessageDetails = '';
6454
6460
  (_a = this.form.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (formSection) {
6461
+ var _a;
6455
6462
  if (formSection.fields) {
6456
6463
  if (!_this.formService.checkValidity(formSection.fields)) {
6464
+ (_a = formSection.fields) === null || _a === void 0 ? void 0 : _a.forEach(function (formField) {
6465
+ if (formField.errorMessage) {
6466
+ errorMessageDetails = errorMessageDetails ? errorMessageDetails + " , " + formField.errorMessage : formField.errorMessage;
6467
+ }
6468
+ });
6457
6469
  var field = formSection.fields.some(function (field) { return field.requiredField && field.errorMessage && !field.value; });
6458
6470
  if (validity && field) {
6459
- _this.alertService.error('Required fields are missing', 'REQUIRED FIELD');
6471
+ _this.alertService.error(errorMessageDetails, 'REQUIRED FIELD');
6460
6472
  }
6461
6473
  else {
6462
- _this.alertService.error('Some fields are invalid', 'INVALID FIELD');
6474
+ _this.alertService.error(errorMessageDetails, 'INVALID FIELD');
6463
6475
  }
6464
6476
  validity = false;
6465
6477
  }