@forwardslashns/taskit-validation-messages 1.10.16 → 1.10.19

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.
Files changed (123) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -1
  4. package/dist/validation/features/account-categories.validation-messages.d.ts +18 -14
  5. package/dist/validation/features/account-categories.validation-messages.d.ts.map +1 -1
  6. package/dist/validation/features/account-categories.validation-messages.js +7 -2
  7. package/dist/validation/features/account-ids.validation-messages.d.ts +23 -18
  8. package/dist/validation/features/account-ids.validation-messages.d.ts.map +1 -1
  9. package/dist/validation/features/account-ids.validation-messages.js +8 -2
  10. package/dist/validation/features/business-activities.validation-messages.d.ts +18 -14
  11. package/dist/validation/features/business-activities.validation-messages.d.ts.map +1 -1
  12. package/dist/validation/features/business-activities.validation-messages.js +7 -2
  13. package/dist/validation/features/client-current-entity-statuses.validation-messages.d.ts +195 -158
  14. package/dist/validation/features/client-current-entity-statuses.validation-messages.d.ts.map +1 -1
  15. package/dist/validation/features/client-current-entity-statuses.validation-messages.js +45 -7
  16. package/dist/validation/features/client-records-addresses.validation-messages.d.ts +71 -58
  17. package/dist/validation/features/client-records-addresses.validation-messages.d.ts.map +1 -1
  18. package/dist/validation/features/client-records-addresses.validation-messages.js +16 -2
  19. package/dist/validation/features/client-records-banks.validation-messages.d.ts +20 -15
  20. package/dist/validation/features/client-records-banks.validation-messages.d.ts.map +1 -1
  21. package/dist/validation/features/client-records-banks.validation-messages.js +8 -2
  22. package/dist/validation/features/client-records-commission-details.validation-messages.d.ts +21 -16
  23. package/dist/validation/features/client-records-commission-details.validation-messages.d.ts.map +1 -1
  24. package/dist/validation/features/client-records-commission-details.validation-messages.js +8 -2
  25. package/dist/validation/features/client-records-contacts.validation-messages.d.ts +41 -33
  26. package/dist/validation/features/client-records-contacts.validation-messages.d.ts.map +1 -1
  27. package/dist/validation/features/client-records-contacts.validation-messages.js +11 -2
  28. package/dist/validation/features/client-records-credit-cards.validation-messages.d.ts +24 -18
  29. package/dist/validation/features/client-records-credit-cards.validation-messages.d.ts.map +1 -1
  30. package/dist/validation/features/client-records-credit-cards.validation-messages.js +9 -2
  31. package/dist/validation/features/client-records-entity-states-histories.validation-messages.d.ts +97 -80
  32. package/dist/validation/features/client-records-entity-states-histories.validation-messages.d.ts.map +1 -1
  33. package/dist/validation/features/client-records-entity-states-histories.validation-messages.js +30 -12
  34. package/dist/validation/features/client-records-entity-types-histories.validation-messages.d.ts +96 -79
  35. package/dist/validation/features/client-records-entity-types-histories.validation-messages.d.ts.map +1 -1
  36. package/dist/validation/features/client-records-entity-types-histories.validation-messages.js +30 -12
  37. package/dist/validation/features/client-records-filing-statuses-histories.validation-messages.d.ts +96 -79
  38. package/dist/validation/features/client-records-filing-statuses-histories.validation-messages.d.ts.map +1 -1
  39. package/dist/validation/features/client-records-filing-statuses-histories.validation-messages.js +30 -12
  40. package/dist/validation/features/client-records-outside-providers.validation-messages.d.ts +10 -8
  41. package/dist/validation/features/client-records-outside-providers.validation-messages.d.ts.map +1 -1
  42. package/dist/validation/features/client-records-outside-providers.validation-messages.js +6 -3
  43. package/dist/validation/features/client-relationships-common.validation-messages.d.ts +69 -55
  44. package/dist/validation/features/client-relationships-common.validation-messages.d.ts.map +1 -1
  45. package/dist/validation/features/client-relationships-common.validation-messages.js +30 -15
  46. package/dist/validation/features/client-relationships-income-sources.validation-messages.d.ts +84 -68
  47. package/dist/validation/features/client-relationships-income-sources.validation-messages.d.ts.map +1 -1
  48. package/dist/validation/features/client-relationships-income-sources.validation-messages.js +21 -4
  49. package/dist/validation/features/client-relationships-owners.validation-messages.d.ts +86 -69
  50. package/dist/validation/features/client-relationships-owners.validation-messages.d.ts.map +1 -1
  51. package/dist/validation/features/client-relationships-owners.validation-messages.js +22 -4
  52. package/dist/validation/features/data-filters.validation-messages.d.ts +16 -12
  53. package/dist/validation/features/data-filters.validation-messages.d.ts.map +1 -1
  54. package/dist/validation/features/data-filters.validation-messages.js +7 -2
  55. package/dist/validation/features/filing-categories.validation-messages.d.ts +18 -14
  56. package/dist/validation/features/filing-categories.validation-messages.d.ts.map +1 -1
  57. package/dist/validation/features/filing-categories.validation-messages.js +7 -2
  58. package/dist/validation/features/income-accounts.validation-messages.d.ts +17 -13
  59. package/dist/validation/features/income-accounts.validation-messages.d.ts.map +1 -1
  60. package/dist/validation/features/income-accounts.validation-messages.js +7 -2
  61. package/dist/validation/features/roles-and-permissions.validation-messages.d.ts +29 -23
  62. package/dist/validation/features/roles-and-permissions.validation-messages.d.ts.map +1 -1
  63. package/dist/validation/features/roles-and-permissions.validation-messages.js +9 -2
  64. package/dist/validation/features/states.validation-messages.d.ts +55 -45
  65. package/dist/validation/features/states.validation-messages.d.ts.map +1 -1
  66. package/dist/validation/features/states.validation-messages.js +13 -2
  67. package/dist/validation/features/template-assignments.validation-messages.d.ts +85 -68
  68. package/dist/validation/features/template-assignments.validation-messages.d.ts.map +1 -1
  69. package/dist/validation/features/template-assignments.validation-messages.js +20 -2
  70. package/dist/validation/features/template-information.validation-messages.d.ts +218 -146
  71. package/dist/validation/features/template-information.validation-messages.d.ts.map +1 -1
  72. package/dist/validation/features/template-information.validation-messages.js +75 -2
  73. package/dist/validation/features/template-recurrence-settings.validation-messages.d.ts +164 -132
  74. package/dist/validation/features/template-recurrence-settings.validation-messages.d.ts.map +1 -1
  75. package/dist/validation/features/template-recurrence-settings.validation-messages.js +37 -4
  76. package/dist/validation/features/template-states.validation-messages.d.ts +49 -39
  77. package/dist/validation/features/template-states.validation-messages.d.ts.map +1 -1
  78. package/dist/validation/features/template-states.validation-messages.js +13 -2
  79. package/dist/validation/features/user-preferences.validation-messages.d.ts +17 -13
  80. package/dist/validation/features/user-preferences.validation-messages.d.ts.map +1 -1
  81. package/dist/validation/features/user-preferences.validation-messages.js +8 -3
  82. package/dist/validation/features/users.validation-messages.d.ts +65 -53
  83. package/dist/validation/features/users.validation-messages.d.ts.map +1 -1
  84. package/dist/validation/features/users.validation-messages.js +17 -4
  85. package/dist/validation/validation-message.formatter.d.ts +2 -0
  86. package/dist/validation/validation-message.formatter.d.ts.map +1 -1
  87. package/dist/validation/validation-message.formatter.js +1 -0
  88. package/dist/validation/validation-message.types.d.ts +30 -0
  89. package/dist/validation/validation-message.types.d.ts.map +1 -0
  90. package/dist/validation/validation-message.types.js +9 -0
  91. package/dist/validation/validation-messages.d.ts +1756 -1394
  92. package/dist/validation/validation-messages.d.ts.map +1 -1
  93. package/package.json +1 -1
  94. package/src/index.ts +14 -0
  95. package/src/validation/features/account-categories.validation-messages.ts +8 -2
  96. package/src/validation/features/account-ids.validation-messages.ts +9 -2
  97. package/src/validation/features/business-activities.validation-messages.ts +8 -2
  98. package/src/validation/features/client-current-entity-statuses.validation-messages.ts +46 -7
  99. package/src/validation/features/client-records-addresses.validation-messages.ts +17 -2
  100. package/src/validation/features/client-records-banks.validation-messages.ts +9 -2
  101. package/src/validation/features/client-records-commission-details.validation-messages.ts +9 -2
  102. package/src/validation/features/client-records-contacts.validation-messages.ts +12 -2
  103. package/src/validation/features/client-records-credit-cards.validation-messages.ts +10 -2
  104. package/src/validation/features/client-records-entity-states-histories.validation-messages.ts +31 -12
  105. package/src/validation/features/client-records-entity-types-histories.validation-messages.ts +31 -12
  106. package/src/validation/features/client-records-filing-statuses-histories.validation-messages.ts +31 -12
  107. package/src/validation/features/client-records-outside-providers.validation-messages.ts +7 -3
  108. package/src/validation/features/client-relationships-common.validation-messages.ts +31 -15
  109. package/src/validation/features/client-relationships-income-sources.validation-messages.ts +22 -4
  110. package/src/validation/features/client-relationships-owners.validation-messages.ts +23 -4
  111. package/src/validation/features/data-filters.validation-messages.ts +8 -2
  112. package/src/validation/features/filing-categories.validation-messages.ts +8 -2
  113. package/src/validation/features/income-accounts.validation-messages.ts +8 -2
  114. package/src/validation/features/roles-and-permissions.validation-messages.ts +10 -2
  115. package/src/validation/features/states.validation-messages.ts +14 -2
  116. package/src/validation/features/template-assignments.validation-messages.ts +21 -2
  117. package/src/validation/features/template-information.validation-messages.ts +83 -2
  118. package/src/validation/features/template-recurrence-settings.validation-messages.ts +38 -4
  119. package/src/validation/features/template-states.validation-messages.ts +14 -2
  120. package/src/validation/features/user-preferences.validation-messages.ts +9 -3
  121. package/src/validation/features/users.validation-messages.ts +18 -4
  122. package/src/validation/validation-message.formatter.ts +4 -6
  123. package/src/validation/validation-message.types.ts +36 -0
@@ -1,83 +1,102 @@
1
- export const CLIENT_RECORDS_ENTITY_STATES = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RECORDS_ENTITY_STATES = defineValidationFeatureMessages({
2
4
  STATE_ID_DOES_NOT_EXIST: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
3
6
  message: `State does not exist`,
4
7
  params: ['id'],
5
8
  affectedFields: ['state'],
6
9
  },
7
10
  NOT_ALIGNED_DATE_ESTABLISHED_DOMESTIC_STATE_STARTING_DATE: {
8
- message: `The state, {domesticState}, starts on {domesticStateStartingDate}, which is earlier than the client's date established, {clientDateEstablished}. Please adjust the start date of the state or the client's date established.`,
11
+ severity: VALIDATION_SEVERITY.ERROR,
12
+ message: `The state, '{domesticState}', starts on '{domesticStateStartingDate}', which is earlier than the client's date established, '{clientDateEstablished}'. Please adjust the start date of the state or the client's date established.`,
9
13
  params: ['clientDateEstablished', 'domesticState', 'domesticStateStartingDate'],
10
14
  affectedFields: ['dateEstablished', 'domesticState'],
11
15
  },
12
16
  NOT_ALIGNED_CLOSE_DATE_DOMESTIC_STATE_STARTING_DATE: {
13
- message: `One or more states have a start date which is after the client's close date of {clientCloseDate}. {domesticState} starting {domesticStateStartingDate}. Please update the state/s start date/s to be before the client's close date, or update the client's close date.`,
17
+ severity: VALIDATION_SEVERITY.ERROR,
18
+ message: `One or more states have a start date which is after the client's close date of '{clientCloseDate}'. '{domesticState}' starting '{domesticStateStartingDate}'. Please update the state/s start date/s to be before the client's close date, or update the client's close date.`,
14
19
  params: ['clientCloseDate', 'domesticState', 'domesticStateStartingDate'],
15
20
  affectedFields: ['closeDate', 'domesticState'],
16
21
  },
17
22
  DOMESTIC_STATE_STARTING_DATE_NOT_POPULATED: {
23
+ severity: VALIDATION_SEVERITY.ERROR,
18
24
  message: `Current Domestic State Starting Date cannot be Empty`,
19
25
  affectedFields: ['stateStartingDate'],
20
26
  },
21
27
  STATES_IDS_DOES_NOT_EXIST: {
28
+ severity: VALIDATION_SEVERITY.ERROR,
22
29
  message: `States do not exist`,
23
30
  params: ['ids'],
24
31
  affectedFields: ['state'],
25
32
  },
26
33
  RESIDENCE_TYPE_DOES_NOT_EXIST: {
34
+ severity: VALIDATION_SEVERITY.ERROR,
27
35
  message: `Residence type does not exist`,
28
36
  params: ['ids'],
29
37
  affectedFields: ['residence'],
30
38
  },
31
39
  AT_LEAST_ONE_DOMESTIC_STATE_SHOULD_EXIST: {
40
+ severity: VALIDATION_SEVERITY.ERROR,
32
41
  message: `At least one domestic state should exist`,
33
42
  affectedFields: ['domesticState'],
34
43
  },
35
44
  STATES_STARTING_DATE_NOT_POPULATED: {
36
- message: `Starting date for {state} cannot be empty`,
45
+ severity: VALIDATION_SEVERITY.ERROR,
46
+ message: `Starting date for '{state}' cannot be empty`,
37
47
  params: ['state'],
38
48
  affectedFields: ['stateStartingDate'],
39
49
  },
40
50
  NOT_ALIGNED_STATES_STARTING_ENDING_DATE: {
41
- message: `The ending date for {state} must be after its starting date`,
51
+ severity: VALIDATION_SEVERITY.ERROR,
52
+ message: `The ending date for '{state}' must be after its starting date`,
42
53
  params: ['state'],
43
54
  affectedFields: ['stateStartingDate', 'stateEndingDate'],
44
55
  },
45
56
  NOT_ALIGNED_DATE_ESTABLISHED_STATES_STARTING_DATE: {
46
- message: `Adjust the start date to be on or after the client's date established, {clientStartDate}.`,
57
+ severity: VALIDATION_SEVERITY.ERROR,
58
+ message: `Adjust the start date to be on or after the client's date established, '{clientStartDate}'.`,
47
59
  params: ['clientStartDate'],
48
60
  affectedFields: ['stateStartingDate', 'dateEstablished'],
49
61
  },
50
62
  NOT_ALIGNED_CLOSE_DATE_STATES_STARTING_DATE: {
51
- message: `Adjust the start date to be before the client's close date, {clientCloseDate}.`,
63
+ severity: VALIDATION_SEVERITY.ERROR,
64
+ message: `Adjust the start date to be before the client's close date, '{clientCloseDate}'.`,
52
65
  params: ['clientCloseDate'],
53
66
  affectedFields: ['stateStartingDate', 'closeDate'],
54
67
  },
55
68
  DOMESTIC_STATES_DATE_GAP_DETECTED: {
56
- message: `There is a gap in the timeframes between {currentState}, ending {currentStateEndDate}, and {nextState}, starting {nextStateStartDate}. Please adjust the dates to fill this gap.`,
69
+ severity: VALIDATION_SEVERITY.ERROR,
70
+ message: `There is a gap in the timeframes between '{currentState}', ending '{currentStateEndDate}', and '{nextState}', starting '{nextStateStartDate}'. Please adjust the dates to fill this gap.`,
57
71
  params: ['currentState', 'currentStateEndDate', 'nextState', 'nextStateStartDate'],
58
72
  affectedFields: ['domesticState'],
59
73
  },
60
74
  STATES_CONSECUTIVE_DUPLICATES_DETECTED: {
61
- message: `There are two entries for {state} with timeframes that immediately follow each other. {state} ending {firstPeriodEnd}, and {state} starting {secondPeriodStart}. Please update one entry to include the entire timeframe for {state}. `,
75
+ severity: VALIDATION_SEVERITY.ERROR,
76
+ message: `There are two entries for '{state}' with timeframes that immediately follow each other. '{state}' ending '{firstPeriodEnd}', and '{state}' starting '{secondPeriodStart}'. Please update one entry to include the entire timeframe for '{state}'. `,
62
77
  params: ['state', 'firstPeriodStart', 'firstPeriodEnd', 'secondPeriodStart'],
63
78
  affectedFields: ['domesticState'],
64
79
  },
65
80
  DOMESTIC_STATE_EARLIEST_AND_DATE_ESTABLISHED_GAP_DETECTED: {
66
- message: `There is a gap between the client's date established ({dateEstablished}) and the start of its first state ({earliestState} starting {earliestStateStartDate}). There must be a state that begins on {dateEstablished}.`,
81
+ severity: VALIDATION_SEVERITY.ERROR,
82
+ message: `There is a gap between the client's date established ('{dateEstablished}') and the start of its first state ('{earliestState}' starting '{earliestStateStartDate}'). There must be a state that begins on '{dateEstablished}'.`,
67
83
  params: ['dateEstablished', 'earliestState', 'earliestStateStartDate'],
68
84
  affectedFields: ['domesticState', 'dateEstablished'],
69
85
  },
70
86
  STATES_DATES_OVERLAP: {
71
- message: `The client already has {state} starting from {startDate2} to {endDate2}. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
87
+ severity: VALIDATION_SEVERITY.ERROR,
88
+ message: `The client already has '{state}' starting from '{startDate2}' to '{endDate2}'. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
72
89
  params: ['state', 'startDate1', 'endDate1', 'startDate2', 'endDate2'],
73
90
  affectedFields: ['domesticState'],
74
91
  },
75
92
  ALL_NON_LAST_DOMESTIC_STATES_REQUIRE_ENDING_DATE: {
93
+ severity: VALIDATION_SEVERITY.ERROR,
76
94
  message: `Only the last domestic state can be open without an end date. Add an ending date to the existing state before adding a start date for a new state.`,
77
95
  affectedFields: ['stateEndingDate'],
78
96
  },
79
97
  CURRENT_DOMESTIC_STATE_CANNOT_HAVE_ENDING_DATE: {
98
+ severity: VALIDATION_SEVERITY.ERROR,
80
99
  message: `The current domestic state cannot have an end date. Please remove the end date for this state.`,
81
100
  affectedFields: ['stateEndingDate'],
82
101
  },
83
- } as const;
102
+ });
@@ -1,82 +1,101 @@
1
- export const CLIENT_RECORDS_ENTITY_TYPES = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RECORDS_ENTITY_TYPES = defineValidationFeatureMessages({
2
4
  ENTITY_TYPE_ID_DOES_NOT_EXIST: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
3
6
  message: `Entity type does not exist`,
4
7
  params: ['id'],
5
8
  affectedFields: ['entityType'],
6
9
  },
7
10
  NOT_ALIGNED_DATE_ESTABLISHED_ENTITY_TYPE_STARTING_DATE: {
8
- message: `One or more entity types have a start date that is before the client's date established, {clientDateEstablished}. ({entityType} starting {entityTypeStartingDate}). Please update the entity type start dates to be on or after the client's date established, or update the client's date established.`,
11
+ severity: VALIDATION_SEVERITY.ERROR,
12
+ message: `One or more entity types have a start date that is before the client's date established, '{clientDateEstablished}'. ('{entityType}' starting '{entityTypeStartingDate}'). Please update the entity type start dates to be on or after the client's date established, or update the client's date established.`,
9
13
  params: ['clientDateEstablished', 'entityType', 'entityTypeStartingDate'],
10
14
  affectedFields: ['dateEstablished', 'entityType'],
11
15
  },
12
16
  NOT_ALIGNED_CLOSE_DATE_ENTITY_TYPE_STARTING_DATE: {
13
- message: `One or more entity types have start dates that are after the client's close date, {clientCloseDate}. {entityType} starting {entityTypeStartingDate}. Please update the entity type/s end date/s to be on or before the client's close date, or update the client's close date.`,
17
+ severity: VALIDATION_SEVERITY.ERROR,
18
+ message: `One or more entity types have start dates that are after the client's close date, '{clientCloseDate}'. '{entityType}' starting '{entityTypeStartingDate}'. Please update the entity type/s end date/s to be on or before the client's close date, or update the client's close date.`,
14
19
  params: ['clientCloseDate', 'entityType', 'entityTypeStartingDate'],
15
20
  affectedFields: ['closeDate', 'entityType'],
16
21
  },
17
22
  ENTITY_TYPE_STARTING_DATE_NOT_POPULATED: {
23
+ severity: VALIDATION_SEVERITY.ERROR,
18
24
  message: `Current Entity Type Starting Date cannot be Empty`,
19
25
  affectedFields: ['entityTypeStartingDate'],
20
26
  },
21
27
  NOT_ALIGNED_ENTITY_TYPE_STARTING_ENDING_DATE: {
28
+ severity: VALIDATION_SEVERITY.ERROR,
22
29
  message: `Entity type starting date needs to be before the ending date`,
23
30
  affectedFields: ['entityTypeStartingDate', 'entityTypeEndingDate'],
24
31
  },
25
32
  ENTITY_TYPES_IDS_DOES_NOT_EXIST: {
33
+ severity: VALIDATION_SEVERITY.ERROR,
26
34
  message: `Entity types do not exist`,
27
35
  params: ['ids'],
28
36
  affectedFields: ['entityType'],
29
37
  },
30
38
  AT_LEAST_ONE_ENTITY_TYPE_SHOULD_EXIST: {
39
+ severity: VALIDATION_SEVERITY.ERROR,
31
40
  message: `At least one entity type should exist`,
32
41
  affectedFields: ['entityType'],
33
42
  },
34
43
  ENTITY_TYPES_STARTING_DATE_NOT_POPULATED: {
35
- message: `Starting date for {entityType} cannot be empty`,
44
+ severity: VALIDATION_SEVERITY.ERROR,
45
+ message: `Starting date for '{entityType}' cannot be empty`,
36
46
  params: ['entityType'],
37
47
  affectedFields: ['entityTypeStartingDate'],
38
48
  },
39
49
  NOT_ALIGNED_ENTITY_TYPES_STARTING_ENDING_DATE: {
40
- message: `The ending date for {entityType} must be after its starting date`,
50
+ severity: VALIDATION_SEVERITY.ERROR,
51
+ message: `The ending date for '{entityType}' must be after its starting date`,
41
52
  params: ['entityType'],
42
53
  affectedFields: ['entityTypeStartingDate', 'entityTypeEndingDate'],
43
54
  },
44
55
  NOT_ALIGNED_DATE_ESTABLISHED_ENTITY_TYPES_STARTING_DATE: {
45
- message: `Adjust the start date to be on or after the client's date established, {clientStartDate}.`,
56
+ severity: VALIDATION_SEVERITY.ERROR,
57
+ message: `Adjust the start date to be on or after the client's date established, '{clientStartDate}'.`,
46
58
  params: ['clientStartDate'],
47
59
  affectedFields: ['entityTypeStartingDate', 'dateEstablished'],
48
60
  },
49
61
  NOT_ALIGNED_CLOSE_DATE_ENTITY_TYPES_STARTING_DATE: {
50
- message: `Adjust the start date to be before the client's close date, {clientCloseDate}.`,
62
+ severity: VALIDATION_SEVERITY.ERROR,
63
+ message: `Adjust the start date to be before the client's close date, '{clientCloseDate}'.`,
51
64
  params: ['clientCloseDate'],
52
65
  affectedFields: ['entityTypeStartingDate', 'closeDate'],
53
66
  },
54
67
  ENTITY_TYPES_DATE_GAP_DETECTED: {
55
- message: `There is a gap in the timeframes between {currentEntityType}, ending {currentEntityTypeEndDate}, and {nextEntityType}, starting {nextEntityTypeStartDate}. Please adjust the dates to fill this gap.`,
68
+ severity: VALIDATION_SEVERITY.ERROR,
69
+ message: `There is a gap in the timeframes between '{currentEntityType}', ending '{currentEntityTypeEndDate}', and '{nextEntityType}', starting '{nextEntityTypeStartDate}'. Please adjust the dates to fill this gap.`,
56
70
  params: ['currentEntityType', 'currentEntityTypeEndDate', 'nextEntityType', 'nextEntityTypeStartDate'],
57
71
  affectedFields: ['entityType'],
58
72
  },
59
73
  ENTITY_TYPES_CONSECUTIVE_DUPLICATES_DETECTED: {
60
- message: `There are two entries for {entityType} with timeframes that immediately follow each other. {entityType} ending {firstPeriodEnd}, and {entityType} starting {secondPeriodStart}. Please update one entry to include the entire timeframe for {entityType}. `,
74
+ severity: VALIDATION_SEVERITY.ERROR,
75
+ message: `There are two entries for '{entityType}' with timeframes that immediately follow each other. '{entityType}' ending '{firstPeriodEnd}', and '{entityType}' starting '{secondPeriodStart}'. Please update one entry to include the entire timeframe for '{entityType}'. `,
61
76
  params: ['entityType', 'firstPeriodStart', 'firstPeriodEnd', 'secondPeriodStart'],
62
77
  affectedFields: ['entityType'],
63
78
  },
64
79
  ENTITY_TYPE_EARLIEST_AND_DATE_ESTABLISHED_GAP_DETECTED: {
65
- message: `There is a gap between the client's date established ({dateEstablished}) and the start of its first entity type ({earliestEntityType} starting {earliestEntityTypeStartDate}). There must be an entity type that begins on {dateEstablished}.`,
80
+ severity: VALIDATION_SEVERITY.ERROR,
81
+ message: `There is a gap between the client's date established ('{dateEstablished}') and the start of its first entity type ('{earliestEntityType}' starting '{earliestEntityTypeStartDate}'). There must be an entity type that begins on '{dateEstablished}'.`,
66
82
  params: ['dateEstablished', 'earliestEntityType', 'earliestEntityTypeStartDate'],
67
83
  affectedFields: ['entityType', 'dateEstablished'],
68
84
  },
69
85
  ENTITY_TYPES_DATES_OVERLAP: {
70
- message: `The client already has {entityType} starting from {startDate2} to {endDate2}. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
86
+ severity: VALIDATION_SEVERITY.ERROR,
87
+ message: `The client already has '{entityType}' starting from '{startDate2}' to '{endDate2}'. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
71
88
  params: ['entityType', 'startDate1', 'endDate1', 'startDate2', 'endDate2'],
72
89
  affectedFields: ['entityType'],
73
90
  },
74
91
  ALL_NON_LAST_ENTITY_TYPES_REQUIRE_ENDING_DATE: {
92
+ severity: VALIDATION_SEVERITY.ERROR,
75
93
  message: `Only the last entity type can be open without an end date. Add an ending date to the existing entity type before adding a start date for a new entity type.`,
76
94
  affectedFields: ['entityTypeEndingDate'],
77
95
  },
78
96
  CURRENT_ENTITY_TYPE_CANNOT_HAVE_ENDING_DATE: {
97
+ severity: VALIDATION_SEVERITY.ERROR,
79
98
  message: `The current entity type cannot have an end date. Please remove the end date for this state.`,
80
99
  affectedFields: ['entityTypeEndingDate'],
81
100
  },
82
- } as const;
101
+ });
@@ -1,82 +1,101 @@
1
- export const CLIENT_RECORDS_FILING_STATUSES = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RECORDS_FILING_STATUSES = defineValidationFeatureMessages({
2
4
  FILING_STATUS_ID_DOES_NOT_EXIST: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
3
6
  message: `Sub/Parent status does not exist`,
4
7
  params: ['id'],
5
8
  affectedFields: ['filingStatus'],
6
9
  },
7
10
  NOT_ALIGNED_DATE_ESTABLISHED_FILING_STATUS_STARTING_DATE: {
8
- message: `The Sub/Parent status {filingStatus} starts on {filingStatusStartingDate} which is earlier than the client's date established, {clientDateEstablished}. Please adjust the start date of the Sub/Parent status or the client's date established.`,
11
+ severity: VALIDATION_SEVERITY.ERROR,
12
+ message: `The Sub/Parent status '{filingStatus}' starts on '{filingStatusStartingDate}' which is earlier than the client's date established, '{clientDateEstablished}'. Please adjust the start date of the Sub/Parent status or the client's date established.`,
9
13
  params: ['clientDateEstablished', 'filingStatus', 'filingStatusStartingDate'],
10
14
  affectedFields: ['dateEstablished', 'filingStatus'],
11
15
  },
12
16
  NOT_ALIGNED_CLOSE_DATE_FILING_STATUS_STARTING_DATE: {
13
- message: `One or more Sub/Parent status have a start date which is after the client's close date of {clientCloseDate}. {filingStatus}, starting {filingStatusStartingDate}. Please update the start date to be earlier than the client's close date, or update the client's close date.`,
17
+ severity: VALIDATION_SEVERITY.ERROR,
18
+ message: `One or more Sub/Parent status have a start date which is after the client's close date of '{clientCloseDate}'. '{filingStatus}', starting '{filingStatusStartingDate}'. Please update the start date to be earlier than the client's close date, or update the client's close date.`,
14
19
  params: ['clientCloseDate', 'filingStatus', 'filingStatusStartingDate'],
15
20
  affectedFields: ['closeDate', 'filingStatus'],
16
21
  },
17
22
  FILING_STATUS_STARTING_DATE_NOT_POPULATED: {
23
+ severity: VALIDATION_SEVERITY.ERROR,
18
24
  message: `Current Sub/Parent status Starting Date cannot be Empty`,
19
25
  affectedFields: ['filingStatusStartingDate'],
20
26
  },
21
27
  NOT_ALIGNED_FILING_STATUS_STARTING_ENDING_DATE: {
28
+ severity: VALIDATION_SEVERITY.ERROR,
22
29
  message: `Sub/Parent status starting date needs to be before the ending date`,
23
30
  affectedFields: ['filingStatusStartingDate', 'filingStatusEndingDate'],
24
31
  },
25
32
  FILING_STATUSES_IDS_DOES_NOT_EXIST: {
33
+ severity: VALIDATION_SEVERITY.ERROR,
26
34
  message: `Sub/Parent status do not exist`,
27
35
  params: ['ids'],
28
36
  affectedFields: ['filingStatus'],
29
37
  },
30
38
  AT_LEAST_ONE_FILING_STATUS_SHOULD_EXIST: {
39
+ severity: VALIDATION_SEVERITY.ERROR,
31
40
  message: `At least one Sub/Parent status should exist`,
32
41
  affectedFields: ['filingStatus'],
33
42
  },
34
43
  FILING_STATUSES_STARTING_DATE_NOT_POPULATED: {
35
- message: `Starting date for {filingStatus} cannot be empty`,
44
+ severity: VALIDATION_SEVERITY.ERROR,
45
+ message: `Starting date for '{filingStatus}' cannot be empty`,
36
46
  params: ['filingStatus'],
37
47
  affectedFields: ['filingStatusStartingDate'],
38
48
  },
39
49
  NOT_ALIGNED_FILING_STATUSES_STARTING_ENDING_DATE: {
40
- message: `The ending date for {filingStatus} must be after its starting date`,
50
+ severity: VALIDATION_SEVERITY.ERROR,
51
+ message: `The ending date for '{filingStatus}' must be after its starting date`,
41
52
  params: ['filingStatus'],
42
53
  affectedFields: ['filingStatusStartingDate', 'filingStatusEndingDate'],
43
54
  },
44
55
  NOT_ALIGNED_DATE_ESTABLISHED_FILING_STATUSES_STARTING_DATE: {
45
- message: `Adjust the start date to be on or after the client's date established, {clientStartDate}.`,
56
+ severity: VALIDATION_SEVERITY.ERROR,
57
+ message: `Adjust the start date to be on or after the client's date established, '{clientStartDate}'.`,
46
58
  params: ['clientStartDate'],
47
59
  affectedFields: ['filingStatusStartingDate', 'dateEstablished'],
48
60
  },
49
61
  NOT_ALIGNED_CLOSE_DATE_FILING_STATUSES_STARTING_DATE: {
50
- message: `Adjust the start date to be before the client's close date, {clientCloseDate}.`,
62
+ severity: VALIDATION_SEVERITY.ERROR,
63
+ message: `Adjust the start date to be before the client's close date, '{clientCloseDate}'.`,
51
64
  params: ['clientCloseDate'],
52
65
  affectedFields: ['filingStatusStartingDate', 'closeDate'],
53
66
  },
54
67
  FILING_STATUSES_DATE_GAP_DETECTED: {
55
- message: `There is a gap in the timeframes between {currentFilingStatus}, ending {currentFilingStatusEndDate}, and {nextFilingStatus}, starting {nextFilingStatusStartDate}. Please adjust the dates to fill this gap.`,
68
+ severity: VALIDATION_SEVERITY.ERROR,
69
+ message: `There is a gap in the timeframes between '{currentFilingStatus}', ending '{currentFilingStatusEndDate}', and '{nextFilingStatus}', starting '{nextFilingStatusStartDate}'. Please adjust the dates to fill this gap.`,
56
70
  params: ['currentFilingStatus', 'currentFilingStatusEndDate', 'nextFilingStatus', 'nextFilingStatusStartDate'],
57
71
  affectedFields: ['filingStatus'],
58
72
  },
59
73
  FILING_STATUSES_CONSECUTIVE_DUPLICATES_DETECTED: {
60
- message: `There are two entries for {filingStatus} with timeframes that immediately follow each other. {filingStatus} ending {firstPeriodEnd}, and {filingStatus} starting {secondPeriodStart}. Please update one entry to include the entire timeframe for {filingStatus}. `,
74
+ severity: VALIDATION_SEVERITY.ERROR,
75
+ message: `There are two entries for '{filingStatus}' with timeframes that immediately follow each other. '{filingStatus}' ending '{firstPeriodEnd}', and '{filingStatus}' starting '{secondPeriodStart}'. Please update one entry to include the entire timeframe for '{filingStatus}'. `,
61
76
  params: ['filingStatus', 'firstPeriodStart', 'firstPeriodEnd', 'secondPeriodStart'],
62
77
  affectedFields: ['filingStatus'],
63
78
  },
64
79
  FILING_STATUS_EARLIEST_AND_DATE_ESTABLISHED_GAP_DETECTED: {
65
- message: `There is a gap between the client's date established ({dateEstablished}) and the start date of the first Sub/Parent status ({earliestFilingStatusStartDate}). Please ensure that the status of one Sub/Parent status matches the client's date established.`,
80
+ severity: VALIDATION_SEVERITY.ERROR,
81
+ message: `There is a gap between the client's date established ('{dateEstablished}') and the start date of the first Sub/Parent status ('{earliestFilingStatusStartDate}'). Please ensure that the status of one Sub/Parent status matches the client's date established.`,
66
82
  params: ['dateEstablished', 'earliestFilingStatusStartDate'],
67
83
  affectedFields: ['filingStatus', 'dateEstablished'],
68
84
  },
69
85
  FILING_STATUSES_DATES_OVERLAP: {
70
- message: `The client already has {filingStatus} starting from {startDate2} to {endDate2}. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
86
+ severity: VALIDATION_SEVERITY.ERROR,
87
+ message: `The client already has '{filingStatus}' starting from '{startDate2}' to '{endDate2}'. Your current entity type overlaps with that time. Please adjust the dates so they don't overlap.`,
71
88
  params: ['filingStatus', 'startDate1', 'endDate1', 'startDate2', 'endDate2'],
72
89
  affectedFields: ['filingStatus'],
73
90
  },
74
91
  ALL_NON_LAST_FILING_STATUSES_REQUIRE_ENDING_DATE: {
92
+ severity: VALIDATION_SEVERITY.ERROR,
75
93
  message: `Only the last Sub/Parent status can be open without an end date. Add an ending date to the existing Sub/Parent status before adding a start date for a new Sub/Parent status.`,
76
94
  affectedFields: ['filingStatusEndingDate'],
77
95
  },
78
96
  CURRENT_FILING_STATUS_CANNOT_HAVE_ENDING_DATE: {
97
+ severity: VALIDATION_SEVERITY.ERROR,
79
98
  message: `The current Sub/Parent status cannot have an end date. Please remove the end date for this state.`,
80
99
  affectedFields: ['filingStatusEndingDate'],
81
100
  },
82
- } as const;
101
+ });
@@ -1,12 +1,16 @@
1
- export const CLIENT_RECORDS_OUTSIDE_PROVIDERS = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RECORDS_OUTSIDE_PROVIDERS = defineValidationFeatureMessages({
2
4
  INVALID_TYPE: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
3
6
  message: `Outside provider types do not exist`,
4
7
  params: ['ids'],
5
8
  affectedFields: ['type'],
6
9
  },
7
10
  SAME_TYPE_TIMELINE_OVERLAP: {
8
- message: `The client already has {outsideProviderType} starting from {startDate}. Your entry overlaps with that time. Please adjust the dates so they don't overlap.`,
11
+ severity: VALIDATION_SEVERITY.ERROR,
12
+ message: `The client already has '{outsideProviderType}' starting from '{startDate}'. Your entry overlaps with that time. Please adjust the dates so they don't overlap.`,
9
13
  params: ['outsideProviderType', 'startDate'],
10
14
  affectedFields: ['starting', 'ending'],
11
15
  },
12
- } as const;
16
+ });
@@ -1,71 +1,87 @@
1
- export const CLIENT_RELATIONSHIPS_COMMON = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RELATIONSHIPS_COMMON = defineValidationFeatureMessages({
2
4
  CURRENT_CLIENT_CANNOT_BE_RELATED_TO_CURRENT_CLIENT: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
3
6
  message: `A client cannot have a relationship with itself.`,
4
7
  affectedFields: ['relatedClient'],
5
8
  },
6
9
  INVALID_RELATIONSHIP_TYPE_FOR_ENTITY_TYPE: {
7
- message: `{clientName} is a/an {entityType}, which can't have {relationshipType}s. Please update the relationship type.`,
10
+ severity: VALIDATION_SEVERITY.ERROR,
11
+ message: `'{clientName}' is a/an '{entityType}', which can't have '{relationshipType}'s. Please update the relationship type.`,
8
12
  params: ['clientName', 'entityType', 'relationshipType'],
9
13
  affectedFields: ['relationshipType'],
10
14
  },
11
15
  STARTING_DATE_BEFORE_CLIENT_DATE_ESTABLISHED: {
12
- message: `This relationship's start date cannot be before {clientName}'s date established, {clientDateEstablished}. Please adjust the dates to proceed.`,
16
+ severity: VALIDATION_SEVERITY.ERROR,
17
+ message: `This relationship's start date cannot be before {clientName}'s date established, '{clientDateEstablished}'. Please adjust the dates to proceed.`,
13
18
  params: ['clientName', 'clientDateEstablished'],
14
19
  affectedFields: ['startingDate'],
15
20
  },
16
21
  STARTING_DATE_ON_OR_AFTER_CLIENT_CLOSE_DATE: {
17
- message: `This relationship's start date cannot be on or after {clientName}'s close date, {clientCloseDate}. Please adjust the dates to proceed.`,
22
+ severity: VALIDATION_SEVERITY.ERROR,
23
+ message: `This relationship's start date cannot be on or after {clientName}'s close date, '{clientCloseDate}'. Please adjust the dates to proceed.`,
18
24
  params: ['clientName', 'clientCloseDate'],
19
25
  affectedFields: ['startingDate'],
20
26
  },
21
27
  STARTING_DATE_BEFORE_RELATED_CLIENT_DATE_ESTABLISHED: {
22
- message: `This relationship's start date cannot be before {relatedClientName}'s date established, {relatedClientDateEstablished}. Please adjust the dates to proceed.`,
28
+ severity: VALIDATION_SEVERITY.ERROR,
29
+ message: `This relationship's start date cannot be before {relatedClientName}'s date established, '{relatedClientDateEstablished}'. Please adjust the dates to proceed.`,
23
30
  params: ['relatedClientName', 'relatedClientDateEstablished'],
24
31
  affectedFields: ['startingDate'],
25
32
  },
26
33
  STARTING_DATE_ON_OR_AFTER_RELATED_CLIENT_CLOSE_DATE: {
27
- message: `This relationship's start date cannot be on or after {relatedClientName}'s close date, {relatedClientCloseDate}. Please adjust the dates to proceed.`,
34
+ severity: VALIDATION_SEVERITY.ERROR,
35
+ message: `This relationship's start date cannot be on or after {relatedClientName}'s close date, '{relatedClientCloseDate}'. Please adjust the dates to proceed.`,
28
36
  params: ['relatedClientName', 'relatedClientCloseDate'],
29
37
  affectedFields: ['startingDate'],
30
38
  },
31
39
  ENDING_DATE_ON_OR_BEFORE_STARTING_DATE: {
32
- message: `Please update the relationship ending date to be after the starting date, {startingDate}.`,
40
+ severity: VALIDATION_SEVERITY.ERROR,
41
+ message: `Please update the relationship ending date to be after the starting date, '{startingDate}'.`,
33
42
  params: ['startingDate'],
34
43
  affectedFields: ['endingDate'],
35
44
  },
36
45
  ENDING_DATE_AFTER_CLIENT_CLOSE_DATE: {
37
- message: `{clientName}'s close date is {clientCloseDate}. One or more relationships have end dates later than this. Please update the following relationship end dates to be on or before {clientCloseDate}: {relationshipsWithEndingDateAfterCloseDate}, or update {clientName}'s close date.`,
46
+ severity: VALIDATION_SEVERITY.ERROR,
47
+ message: `{clientName}'s close date is '{clientCloseDate}'. One or more relationships have end dates later than this. Please update the following relationship end dates to be on or before '{clientCloseDate}': '{relationshipsWithEndingDateAfterCloseDate}', or update {clientName}'s close date.`,
38
48
  params: ['clientName', 'clientCloseDate', 'relationshipsWithEndingDateAfterCloseDate'],
39
49
  affectedFields: ['endingDate'],
40
50
  },
41
51
  ENDING_DATE_AFTER_RELATED_CLIENT_CLOSE_DATE: {
42
- message: `{relatedClientName}'s close date is {relatedClientCloseDate}. One or more relationships have end dates later than this. Please update the following relationship end dates to be on or before {relatedClientCloseDate}: {relationshipsWithEndingDateAfterCloseDate}, or update {relatedClientName}'s close date.`,
52
+ severity: VALIDATION_SEVERITY.ERROR,
53
+ message: `{relatedClientName}'s close date is '{relatedClientCloseDate}'. One or more relationships have end dates later than this. Please update the following relationship end dates to be on or before '{relatedClientCloseDate}': '{relationshipsWithEndingDateAfterCloseDate}', or update {relatedClientName}'s close date.`,
43
54
  params: ['relatedClientName', 'relatedClientCloseDate', 'relationshipsWithEndingDateAfterCloseDate'],
44
55
  affectedFields: ['endingDate'],
45
56
  },
46
57
  FINAL_REQUIRED_WHEN_ENDING_DATE_MATCHES_CLIENT_CLOSE_DATE: {
47
- message: `The relationship between {clientName} and {relatedClientName} has no end date or is not marked as final. Please update {relatedClientName}'s end date to be on or before {clientName}'s close date of {clientCloseDate}, or mark the relationship as final.`,
58
+ severity: VALIDATION_SEVERITY.ERROR,
59
+ message: `The relationship between '{clientName}' and '{relatedClientName}' has no end date or is not marked as final. Please update {relatedClientName}'s end date to be on or before {clientName}'s close date of '{clientCloseDate}', or mark the relationship as final.`,
48
60
  params: ['clientName', 'relatedClientName', 'clientCloseDate'],
49
61
  affectedFields: ['endingDate', 'final'],
50
62
  },
51
63
  FINAL_REQUIRED_WHEN_ENDING_DATE_MATCHES_RELATED_CLIENT_CLOSE_DATE: {
52
- message: `The relationship between {clientName} and {relatedClientName} has no end date or is not marked as final. Please update {clientName}'s end date to be on or before {relatedClientName}'s close date of {relatedClientCloseDate}, or mark the relationship as final.`,
64
+ severity: VALIDATION_SEVERITY.ERROR,
65
+ message: `The relationship between '{clientName}' and '{relatedClientName}' has no end date or is not marked as final. Please update {clientName}'s end date to be on or before {relatedClientName}'s close date of '{relatedClientCloseDate}', or mark the relationship as final.`,
53
66
  params: ['clientName', 'relatedClientName', 'relatedClientCloseDate'],
54
67
  affectedFields: ['endingDate', 'final'],
55
68
  },
56
69
  CIRCULAR_RELATIONSHIP_DETECTED: {
57
- message: `{clientName} is listed as a {relationshipType} of {relatedClientName}, during the same timeframe that {relatedClientName} is listed as a {relationshipType} of {clientName}. Please review the relationship records for both clients and adjust the dates or relationship types to prevent a circular loop.`,
70
+ severity: VALIDATION_SEVERITY.ERROR,
71
+ message: `'{clientName}' is listed as a '{relationshipType}' of '{relatedClientName}', during the same timeframe that '{relatedClientName}' is listed as a '{relationshipType}' of '{clientName}'. Please review the relationship records for both clients and adjust the dates or relationship types to prevent a circular loop.`,
58
72
  params: ['clientName', 'relatedClientName', 'relationshipType'],
59
73
  affectedFields: ['relationshipType', 'relatedClient', 'startingDate', 'endingDate'],
60
74
  },
61
75
  CONFLICTING_RELATIONSHIP_TYPES_SAME_TIMEFRAME: {
62
- message: `{relatedClientName} cannot be associated with {clientName} more than once within the same timeframe. Please ensure there are no conflicting relationships for these clients in this timeframe.`,
76
+ severity: VALIDATION_SEVERITY.ERROR,
77
+ message: `'{relatedClientName}' cannot be associated with '{clientName}' more than once within the same timeframe. Please ensure there are no conflicting relationships for these clients in this timeframe.`,
63
78
  params: ['relatedClientName', 'clientName'],
64
79
  affectedFields: ['relationshipType', 'relatedClient', 'startingDate', 'endingDate'],
65
80
  },
66
81
  CONSECUTIVE_DUPLICATE_RELATIONSHIPS: {
67
- message: `There is another {relationshipType} relationship between {relatedClientName} and {clientName} ending on {relationshipEnding}. Please review and adjust the dates to track this relationship in one record.`,
82
+ severity: VALIDATION_SEVERITY.ERROR,
83
+ message: `There is another '{relationshipType}' relationship between '{relatedClientName}' and '{clientName}' ending on '{relationshipEnding}'. Please review and adjust the dates to track this relationship in one record.`,
68
84
  params: ['relationshipType', 'relatedClientName', 'clientName', 'relationshipEnding'],
69
85
  affectedFields: ['startingDate', 'endingDate'],
70
86
  },
71
- } as const;
87
+ });
@@ -1,71 +1,89 @@
1
- export const CLIENT_RELATIONSHIPS_INCOME_SOURCES = {
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const CLIENT_RELATIONSHIPS_INCOME_SOURCES = defineValidationFeatureMessages({
2
4
  SUBSIDIARY_CANNOT_HAVE_PARENT: {
3
- message: `{clientName} cannot have subsidiary relationships since it is filing as a subsidiary under {parentClientName} during this timeframe. Please adjust the timeframe or select a different relationship type.`,
5
+ severity: VALIDATION_SEVERITY.ERROR,
6
+ message: `'{clientName}' cannot have subsidiary relationships since it is filing as a subsidiary under '{parentClientName}' during this timeframe. Please adjust the timeframe or select a different relationship type.`,
4
7
  params: ['clientName', 'parentClientName'],
5
8
  affectedFields: ['relationshipType', 'startingDate', 'endingDate'],
6
9
  },
7
10
  SUBSIDIARY_REQUIRES_FILES_SEPARATELY: {
11
+ severity: VALIDATION_SEVERITY.ERROR,
8
12
  message: `A subsidiary relationship can only be added to an entity that files separately. Please update the Sub/Parent status before adding a subsidiary relationship, or choose a different relationship type.`,
9
13
  affectedFields: ['relationshipType', 'filingStatus'],
10
14
  },
11
15
  SUBSIDIARY_PROFIT_PERCENTAGE_MUST_BE_100: {
16
+ severity: VALIDATION_SEVERITY.ERROR,
12
17
  message: `A subsidiary must allocate 100% profit to its parent. Please update the percentage to 100% or change the relationship type.`,
13
18
  affectedFields: ['profit', 'relationshipType'],
14
19
  },
15
20
  SUBSIDIARY_LOSS_PERCENTAGE_MUST_BE_100: {
21
+ severity: VALIDATION_SEVERITY.ERROR,
16
22
  message: `A subsidiary must allocate 100% loss to its parent. Please update the percentage to 100% or change the relationship type.`,
17
23
  affectedFields: ['loss', 'relationshipType'],
18
24
  },
19
25
  SUBSIDIARY_CAPITAL_PERCENTAGE_MUST_BE_100: {
26
+ severity: VALIDATION_SEVERITY.ERROR,
20
27
  message: `A subsidiary must allocate 100% capital to its parent. Please update the percentage to 100% or change the relationship type.`,
21
28
  affectedFields: ['capital', 'relationshipType'],
22
29
  },
23
30
  SUBSIDIARY_ENTITY_TYPE_MISMATCH: {
31
+ severity: VALIDATION_SEVERITY.ERROR,
24
32
  message: `A subsidiary entity must be the same entity type as the client during the relationship's timeframe (besides DBA or LLC subsidiaries). Please select a different relationship type, or update either client's entity type.`,
25
33
  affectedFields: ['relatedClient', 'relationshipType'],
26
34
  },
27
35
  K1_ISSUER_PROFIT_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
36
+ severity: VALIDATION_SEVERITY.ERROR,
28
37
  message: `A K1 issuer must allocate a profit percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
29
38
  affectedFields: ['profit', 'k1Applicable'],
30
39
  },
31
40
  K1_ISSUER_LOSS_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
41
+ severity: VALIDATION_SEVERITY.ERROR,
32
42
  message: `A K1 issuer must allocate a loss percentage greater than 0%. Please enter a profit percentage, or change Receives K1 to 'No'.`,
33
43
  affectedFields: ['loss', 'k1Applicable'],
34
44
  },
35
45
  K1_ISSUER_CAPITAL_PERCENTAGE_MUST_BE_GREATER_THAN_0: {
46
+ severity: VALIDATION_SEVERITY.ERROR,
36
47
  message: `A K1 issuer must allocate a capital percentage greater than 0%. Please enter a capital percentage, or change Receives K1 to 'No'.`,
37
48
  affectedFields: ['capital', 'k1Applicable'],
38
49
  },
39
50
  K1_ISSUER_NO_K1_PROFIT_PERCENTAGE_MUST_BE_0: {
51
+ severity: VALIDATION_SEVERITY.ERROR,
40
52
  message: `A K1 issuer that does not issue a K1 cannot allocate a profit percentage. Please update the profit percentage to 0%, or change Receives K1 to 'Yes'.`,
41
53
  affectedFields: ['profit', 'k1Applicable'],
42
54
  },
43
55
  K1_ISSUER_NO_K1_LOSS_PERCENTAGE_MUST_BE_0: {
56
+ severity: VALIDATION_SEVERITY.ERROR,
44
57
  message: `A K1 issuer that does not issue a K1 cannot allocate a loss percentage. Please update the loss percentage to 0%, or change Receives K1 to 'Yes'.`,
45
58
  affectedFields: ['loss', 'k1Applicable'],
46
59
  },
47
60
  K1_ISSUER_NO_K1_CAPITAL_PERCENTAGE_MUST_BE_0: {
61
+ severity: VALIDATION_SEVERITY.ERROR,
48
62
  message: `A K1 issuer that does not issue a K1 cannot allocate a capital percentage. Please update the capital percentage to 0%, or change Receives K1 to 'Yes'.`,
49
63
  affectedFields: ['capital', 'k1Applicable'],
50
64
  },
51
65
  K1_ISSUER_INVALID_ENTITY_TYPE: {
52
- message: `{relatedClient} is a/an {entityType}, which cannot issue K1s. Please select a different client or choose a different relationship type.`,
66
+ severity: VALIDATION_SEVERITY.ERROR,
67
+ message: `'{relatedClient}' is a/an '{entityType}', which cannot issue K1s. Please select a different client or choose a different relationship type.`,
53
68
  params: ['relatedClient', 'entityType'],
54
69
  affectedFields: ['relatedClient', 'relationshipType'],
55
70
  },
56
71
  INCOME_SOURCE_TOTAL_PROFIT_PERCENTAGE_EXCEEDS_100: {
72
+ severity: VALIDATION_SEVERITY.ERROR,
57
73
  message: `The ownership percentages for {relatedClient}'s profit exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
58
74
  params: ['relatedClient'],
59
75
  affectedFields: ['profit', 'startingDate', 'endingDate'],
60
76
  },
61
77
  INCOME_SOURCE_TOTAL_LOSS_PERCENTAGE_EXCEEDS_100: {
78
+ severity: VALIDATION_SEVERITY.ERROR,
62
79
  message: `The ownership percentages for {relatedClient}'s loss exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
63
80
  params: ['relatedClient'],
64
81
  affectedFields: ['loss', 'startingDate', 'endingDate'],
65
82
  },
66
83
  INCOME_SOURCE_TOTAL_CAPITAL_PERCENTAGE_EXCEEDS_100: {
84
+ severity: VALIDATION_SEVERITY.ERROR,
67
85
  message: `The ownership percentages for {relatedClient}'s capital exceeds 100% for this timeframe. Please update their shareholder percentages so that the total between all owners does not exceed 100%.`,
68
86
  params: ['relatedClient'],
69
87
  affectedFields: ['capital', 'startingDate', 'endingDate'],
70
88
  },
71
- } as const;
89
+ });