@limetech/lime-elements 34.1.0-next.22 → 34.1.0-next.23

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.
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ValidationStatus } from './form.types';
2
+ import { FormError, ValidationStatus } from './form.types';
3
3
  /**
4
4
  * @exampleComponent limel-example-form
5
5
  * @exampleComponent limel-example-nested-form
@@ -9,6 +9,7 @@ import { ValidationStatus } from './form.types';
9
9
  * @exampleComponent limel-example-props-factory-form
10
10
  * @exampleComponent limel-example-form-layout
11
11
  * @exampleComponent limel-example-form-span-fields
12
+ * @exampleComponent limel-example-custom-error-message
12
13
  */
13
14
  export declare class Form {
14
15
  /**
@@ -36,6 +37,10 @@ export declare class Form {
36
37
  * that should be set, along with its value.
37
38
  */
38
39
  propsFactory?: (schema: Record<string, any>) => Record<string, any>;
40
+ /**
41
+ * Custom function to customize the default error messages
42
+ */
43
+ transformErrors?: (errors: FormError[]) => FormError[];
39
44
  /**
40
45
  * Emitted when a change is made within the form
41
46
  */
@@ -64,4 +69,5 @@ export declare class Form {
64
69
  private setSchemaId;
65
70
  private createValidator;
66
71
  private getValidationErrors;
72
+ private getCustomErrorMessages;
67
73
  }
@@ -10,7 +10,7 @@ import { Action as Action1, Chip, DateType, DialogHeading, FileInfo, FlexContain
10
10
  import { CircularProgressSize } from "./components/circular-progress/circular-progress.types";
11
11
  import { ColorScheme, Language } from "./components/code-editor/code-editor.types";
12
12
  import { Action } from "./components/collapsible-section/action";
13
- import { ValidationStatus } from "./components/form/form.types";
13
+ import { FormError, ValidationStatus } from "./components/form/form.types";
14
14
  import { IconSize } from "./components/icon/icon.types";
15
15
  import { InputType } from "./components/input-field/input-field.types";
16
16
  import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
@@ -429,6 +429,10 @@ export namespace Components {
429
429
  id?: string;
430
430
  [key: string]: any;
431
431
  };
432
+ /**
433
+ * Custom function to customize the default error messages
434
+ */
435
+ "transformErrors"?: (errors: FormError[]) => FormError[];
432
436
  /**
433
437
  * Value of the form
434
438
  */
@@ -1794,6 +1798,10 @@ declare namespace LocalJSX {
1794
1798
  id?: string;
1795
1799
  [key: string]: any;
1796
1800
  };
1801
+ /**
1802
+ * Custom function to customize the default error messages
1803
+ */
1804
+ "transformErrors"?: (errors: FormError[]) => FormError[];
1797
1805
  /**
1798
1806
  * Value of the form
1799
1807
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "34.1.0-next.22",
3
+ "version": "34.1.0-next.23",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",