@aemforms/af-core 0.22.44 → 0.22.45

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/lib/Field.js CHANGED
@@ -621,8 +621,8 @@ class Field extends Scriptable_1.default {
621
621
  return this._applyUpdates(['valid', 'errorMessage', 'validationMessage', 'validity'], changes);
622
622
  }
623
623
  triggerValidationEvent(changes) {
624
- if (changes.valid) {
625
- if (this.valid) {
624
+ if (changes.validity) {
625
+ if (this.validity.valid) {
626
626
  this.dispatch(new Events_1.Valid());
627
627
  }
628
628
  else {
@@ -631,12 +631,11 @@ class Field extends Scriptable_1.default {
631
631
  }
632
632
  }
633
633
  validate() {
634
- var _a;
635
634
  if (this.visible === false) {
636
635
  return [];
637
636
  }
638
637
  const changes = this.evaluateConstraints();
639
- if ((_a = changes === null || changes === void 0 ? void 0 : changes.validity) === null || _a === void 0 ? void 0 : _a.valid) {
638
+ if (changes.validity) {
640
639
  this.triggerValidationEvent(changes);
641
640
  this.notifyDependents(new Events_1.Change({ changes: Object.values(changes) }));
642
641
  }
@@ -174,6 +174,6 @@ export declare const getConstraintTypeMessages: () => {
174
174
  uniqueItemsMismatch: "All the items must be unique.";
175
175
  minItemsMismatch: "Specify a number of items equal to or greater than ${0}.";
176
176
  maxItemsMismatch: "Specify a number of items equal to or less than ${0}.";
177
- expressionMismatch: "The validation expression is invalid.";
177
+ expressionMismatch: "Please enter a valid value.";
178
178
  };
179
179
  export {};
package/lib/types/Json.js CHANGED
@@ -57,7 +57,7 @@ const defaultConstraintTypeMessages = Object.freeze({
57
57
  [exports.ConstraintType.UNIQUE_ITEMS_MISMATCH]: 'All the items must be unique.',
58
58
  [exports.ConstraintType.MIN_ITEMS_MISMATCH]: 'Specify a number of items equal to or greater than ${0}.',
59
59
  [exports.ConstraintType.MAX_ITEMS_MISMATCH]: 'Specify a number of items equal to or less than ${0}.',
60
- [exports.ConstraintType.EXPRESSION_MISMATCH]: 'The validation expression is invalid.'
60
+ [exports.ConstraintType.EXPRESSION_MISMATCH]: 'Please enter a valid value.'
61
61
  });
62
62
  const transformObjectKeys = (obj, transformer) => {
63
63
  if (typeof obj !== 'object' || obj === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aemforms/af-core",
3
- "version": "0.22.44",
3
+ "version": "0.22.45",
4
4
  "description": "Core Module for Forms Runtime",
5
5
  "author": "Adobe Systems",
6
6
  "license": "Adobe Proprietary",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@adobe/json-formula": "0.1.50",
38
- "@aemforms/af-formatters": "^0.22.44"
38
+ "@aemforms/af-formatters": "^0.22.45"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/preset-env": "^7.20.2",