@opencrvs/toolkit 1.8.0-rc.f8a9481 → 1.8.0-rc.f8b1f33

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.
@@ -3,10 +3,7 @@ import { EventState, ActionUpdate } from '../events/ActionDocument';
3
3
  import { FieldConfig } from '../events/FieldConfig';
4
4
  import { FieldUpdateValue } from '../events/FieldValue';
5
5
  import { TranslationConfig } from '../events/TranslationConfig';
6
- import { FieldConditional } from '../events/Conditional';
7
6
  export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
8
- export declare function isConditionMet(conditional: JSONSchema, values: Record<string, unknown>): boolean;
9
- export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, unknown>): boolean;
10
7
  export declare function isFieldVisible(field: FieldConfig, form: ActionUpdate | EventState): boolean;
11
8
  export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState): boolean;
12
9
  export declare function isFieldDisplayedOnReview(field: FieldConfig, form: ActionUpdate | EventState): boolean;
@@ -58,7 +55,12 @@ export declare function validateFieldInput({ field, value }: {
58
55
  }): {
59
56
  message: TranslationConfig;
60
57
  }[];
61
- export declare function runFieldValidations({ field, values }: {
58
+ /**
59
+ * Gets applicable validation errors based on its type and custom validators.
60
+ *
61
+ * @returns an array of error messages for the field
62
+ */
63
+ export declare function getFieldValidationErrors({ field, values }: {
62
64
  field: FieldConfig;
63
65
  values: ActionUpdate;
64
66
  }): {