@forwardslashns/taskit-validation-messages 1.10.42 → 1.10.44

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 (50) hide show
  1. package/dist/validation/features/account-categories.validation-messages.js +1 -1
  2. package/dist/validation/features/account-ids.validation-messages.js +1 -1
  3. package/dist/validation/features/business-activities.validation-messages.js +1 -1
  4. package/dist/validation/features/client-current-entity-statuses.validation-messages.js +6 -6
  5. package/dist/validation/features/client-records-entity-states-histories.validation-messages.js +10 -10
  6. package/dist/validation/features/client-records-entity-types-histories.validation-messages.js +10 -10
  7. package/dist/validation/features/client-records-filing-statuses-histories.validation-messages.js +10 -10
  8. package/dist/validation/features/client-records-outside-providers.validation-messages.js +1 -1
  9. package/dist/validation/features/client-relationships-common.validation-messages.js +13 -13
  10. package/dist/validation/features/client-relationships-income-sources.validation-messages.js +2 -2
  11. package/dist/validation/features/client-relationships-owners.validation-messages.js +2 -2
  12. package/dist/validation/features/client-template-assignments.validation-messages.js +1 -1
  13. package/dist/validation/features/client-templates.validation-messages.js +1 -1
  14. package/dist/validation/features/filing-categories.validation-messages.js +1 -1
  15. package/dist/validation/features/income-accounts.validation-messages.js +1 -1
  16. package/dist/validation/features/roles-and-permissions.validation-messages.js +3 -3
  17. package/dist/validation/features/states.validation-messages.js +3 -3
  18. package/dist/validation/features/template-assignments.validation-messages.js +1 -1
  19. package/dist/validation/features/template-information.validation-messages.d.ts.map +1 -1
  20. package/dist/validation/features/template-information.validation-messages.js +16 -16
  21. package/dist/validation/features/template-recurrence-settings.validation-messages.d.ts.map +1 -1
  22. package/dist/validation/features/template-recurrence-settings.validation-messages.js +6 -6
  23. package/dist/validation/features/user-preferences.validation-messages.js +1 -1
  24. package/dist/validation/features/users.validation-messages.js +5 -5
  25. package/dist/validation/validation-message.formatter.d.ts.map +1 -1
  26. package/dist/validation/validation-message.formatter.js +7 -1
  27. package/package.json +1 -1
  28. package/src/validation/features/account-categories.validation-messages.ts +1 -1
  29. package/src/validation/features/account-ids.validation-messages.ts +1 -1
  30. package/src/validation/features/business-activities.validation-messages.ts +1 -1
  31. package/src/validation/features/client-current-entity-statuses.validation-messages.ts +6 -6
  32. package/src/validation/features/client-records-entity-states-histories.validation-messages.ts +10 -10
  33. package/src/validation/features/client-records-entity-types-histories.validation-messages.ts +10 -10
  34. package/src/validation/features/client-records-filing-statuses-histories.validation-messages.ts +10 -10
  35. package/src/validation/features/client-records-outside-providers.validation-messages.ts +1 -1
  36. package/src/validation/features/client-relationships-common.validation-messages.ts +13 -13
  37. package/src/validation/features/client-relationships-income-sources.validation-messages.ts +2 -2
  38. package/src/validation/features/client-relationships-owners.validation-messages.ts +2 -2
  39. package/src/validation/features/client-template-assignments.validation-messages.ts +1 -1
  40. package/src/validation/features/client-templates.validation-messages.ts +1 -1
  41. package/src/validation/features/filing-categories.validation-messages.ts +1 -1
  42. package/src/validation/features/income-accounts.validation-messages.ts +1 -1
  43. package/src/validation/features/roles-and-permissions.validation-messages.ts +3 -3
  44. package/src/validation/features/states.validation-messages.ts +3 -3
  45. package/src/validation/features/template-assignments.validation-messages.ts +1 -1
  46. package/src/validation/features/template-information.validation-messages.ts +16 -31
  47. package/src/validation/features/template-recurrence-settings.validation-messages.ts +6 -10
  48. package/src/validation/features/user-preferences.validation-messages.ts +1 -1
  49. package/src/validation/features/users.validation-messages.ts +5 -5
  50. package/src/validation/validation-message.formatter.ts +9 -1
@@ -8,79 +8,79 @@ export const CLIENT_RELATIONSHIPS_COMMON = defineValidationFeatureMessages({
8
8
  },
9
9
  INVALID_RELATIONSHIP_TYPE_FOR_ENTITY_TYPE: {
10
10
  severity: VALIDATION_SEVERITY.ERROR,
11
- message: `'{clientName}' is a/an '{entityType}', which can't have '{relationshipType}'s. Please update the relationship type.`,
11
+ message: `{clientName} is a/an {entityType}, which can't have {relationshipType}s. Please update the relationship type.`,
12
12
  params: ['clientName', 'entityType', 'relationshipType'],
13
13
  affectedFields: ['relationshipType'],
14
14
  },
15
15
  STARTING_DATE_BEFORE_CLIENT_DATE_ESTABLISHED: {
16
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.`,
17
+ message: `This relationship's start date cannot be before {clientName}'s date established, {clientDateEstablished}. Please adjust the dates to proceed.`,
18
18
  params: ['clientName', 'clientDateEstablished'],
19
19
  affectedFields: ['startingDate'],
20
20
  },
21
21
  STARTING_DATE_ON_OR_AFTER_CLIENT_CLOSE_DATE: {
22
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.`,
23
+ message: `This relationship's start date cannot be on or after {clientName}'s close date, {clientCloseDate}. Please adjust the dates to proceed.`,
24
24
  params: ['clientName', 'clientCloseDate'],
25
25
  affectedFields: ['startingDate'],
26
26
  },
27
27
  STARTING_DATE_BEFORE_RELATED_CLIENT_DATE_ESTABLISHED: {
28
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.`,
29
+ message: `This relationship's start date cannot be before {relatedClientName}'s date established, {relatedClientDateEstablished}. Please adjust the dates to proceed.`,
30
30
  params: ['relatedClientName', 'relatedClientDateEstablished'],
31
31
  affectedFields: ['startingDate'],
32
32
  },
33
33
  STARTING_DATE_ON_OR_AFTER_RELATED_CLIENT_CLOSE_DATE: {
34
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.`,
35
+ message: `This relationship's start date cannot be on or after {relatedClientName}'s close date, {relatedClientCloseDate}. Please adjust the dates to proceed.`,
36
36
  params: ['relatedClientName', 'relatedClientCloseDate'],
37
37
  affectedFields: ['startingDate'],
38
38
  },
39
39
  ENDING_DATE_ON_OR_BEFORE_STARTING_DATE: {
40
40
  severity: VALIDATION_SEVERITY.ERROR,
41
- message: `Please update the relationship ending date to be after the starting date, '{startingDate}'.`,
41
+ message: `Please update the relationship ending date to be after the starting date, {startingDate}.`,
42
42
  params: ['startingDate'],
43
43
  affectedFields: ['endingDate'],
44
44
  },
45
45
  ENDING_DATE_AFTER_CLIENT_CLOSE_DATE: {
46
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.`,
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.`,
48
48
  params: ['clientName', 'clientCloseDate', 'relationshipsWithEndingDateAfterCloseDate'],
49
49
  affectedFields: ['endingDate'],
50
50
  },
51
51
  ENDING_DATE_AFTER_RELATED_CLIENT_CLOSE_DATE: {
52
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.`,
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.`,
54
54
  params: ['relatedClientName', 'relatedClientCloseDate', 'relationshipsWithEndingDateAfterCloseDate'],
55
55
  affectedFields: ['endingDate'],
56
56
  },
57
57
  FINAL_REQUIRED_WHEN_ENDING_DATE_MATCHES_CLIENT_CLOSE_DATE: {
58
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.`,
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.`,
60
60
  params: ['clientName', 'relatedClientName', 'clientCloseDate'],
61
61
  affectedFields: ['endingDate', 'final'],
62
62
  },
63
63
  FINAL_REQUIRED_WHEN_ENDING_DATE_MATCHES_RELATED_CLIENT_CLOSE_DATE: {
64
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.`,
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.`,
66
66
  params: ['clientName', 'relatedClientName', 'relatedClientCloseDate'],
67
67
  affectedFields: ['endingDate', 'final'],
68
68
  },
69
69
  CIRCULAR_RELATIONSHIP_DETECTED: {
70
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.`,
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.`,
72
72
  params: ['clientName', 'relatedClientName', 'relationshipType'],
73
73
  affectedFields: ['relationshipType', 'relatedClient', 'startingDate', 'endingDate'],
74
74
  },
75
75
  CONFLICTING_RELATIONSHIP_TYPES_SAME_TIMEFRAME: {
76
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.`,
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.`,
78
78
  params: ['relatedClientName', 'clientName'],
79
79
  affectedFields: ['relationshipType', 'relatedClient', 'startingDate', 'endingDate'],
80
80
  },
81
81
  CONSECUTIVE_DUPLICATE_RELATIONSHIPS: {
82
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.`,
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.`,
84
84
  params: ['relationshipType', 'relatedClientName', 'clientName', 'relationshipEnding'],
85
85
  affectedFields: ['startingDate', 'endingDate'],
86
86
  },
@@ -3,7 +3,7 @@ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validat
3
3
  export const CLIENT_RELATIONSHIPS_INCOME_SOURCES = defineValidationFeatureMessages({
4
4
  SUBSIDIARY_CANNOT_HAVE_PARENT: {
5
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.`,
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.`,
7
7
  params: ['clientName', 'parentClientName'],
8
8
  affectedFields: ['relationshipType', 'startingDate', 'endingDate'],
9
9
  },
@@ -64,7 +64,7 @@ export const CLIENT_RELATIONSHIPS_INCOME_SOURCES = defineValidationFeatureMessag
64
64
  },
65
65
  K1_ISSUER_INVALID_ENTITY_TYPE: {
66
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.`,
67
+ message: `{relatedClient} is a/an {entityType}, which cannot issue K1s. Please select a different client or choose a different relationship type.`,
68
68
  params: ['relatedClient', 'entityType'],
69
69
  affectedFields: ['relatedClient', 'relationshipType'],
70
70
  },
@@ -13,13 +13,13 @@ export const CLIENT_RELATIONSHIPS_OWNERS = defineValidationFeatureMessages({
13
13
  },
14
14
  MULTIPLE_PARENT_RELATIONSHIPS_SAME_TIMEFRAME: {
15
15
  severity: VALIDATION_SEVERITY.ERROR,
16
- message: `There can only be one parent relationship associated to a client during the same timeframe. There is a current parent relationship with '{parentRelatedClientName}' starting '{relationshipStarting}'. Please add an end date to that relationship before adding a new one.`,
16
+ message: `There can only be one parent relationship associated to a client during the same timeframe. There is a current parent relationship with {parentRelatedClientName} starting {relationshipStarting}. Please add an end date to that relationship before adding a new one.`,
17
17
  params: ['parentRelatedClientName', 'relationshipStarting'],
18
18
  affectedFields: ['relationshipType', 'startingDate'],
19
19
  },
20
20
  PARENT_CANNOT_BE_SUB_ENTITY: {
21
21
  severity: VALIDATION_SEVERITY.ERROR,
22
- message: `'{relatedClientName}' cannot be the parent of '{clientName}', since it is filing as a sub-entity under another parent during this timeframe. Please adjust the timeframe or select a different relationship type.`,
22
+ message: `{relatedClientName} cannot be the parent of {clientName}, since it is filing as a sub-entity under another parent during this timeframe. Please adjust the timeframe or select a different relationship type.`,
23
23
  params: ['relatedClientName', 'clientName'],
24
24
  affectedFields: ['relatedClient', 'relationshipType', 'startingDate', 'endingDate'],
25
25
  },
@@ -23,7 +23,7 @@ export const CLIENT_TEMPLATE_ASSIGNMENTS = defineValidationFeatureMessages({
23
23
  },
24
24
  ORDER_NOT_CONSECUTIVE: {
25
25
  severity: VALIDATION_SEVERITY.ERROR,
26
- message: 'Assignment orders must be consecutive starting from 1. Expected orders: {expected}',
26
+ message: `Assignment orders must be consecutive starting from 1. Expected orders: {expected}`,
27
27
  params: ['expected'],
28
28
  affectedFields: ['assignments.order'],
29
29
  },
@@ -164,7 +164,7 @@ export const CLIENT_TEMPLATES = defineValidationFeatureMessages({
164
164
  },
165
165
  OVERRIDE_DAY_EXCEEDS_MONTH_MAX: {
166
166
  severity: VALIDATION_SEVERITY.ERROR,
167
- message: `Day '{dayOfMonth}' is not valid for '{monthName}'. The maximum allowed day is '{maxDays}'.`,
167
+ message: `Day {dayOfMonth} is not valid for {monthName}. The maximum allowed day is {maxDays}.`,
168
168
  params: ['dayOfMonth', 'monthName', 'maxDays'],
169
169
  affectedFields: ['recurrence.dayOfMonth'],
170
170
  },
@@ -14,7 +14,7 @@ export const FILING_CATEGORIES = defineValidationFeatureMessages({
14
14
  },
15
15
  NAME_ALREADY_EXISTS: {
16
16
  severity: VALIDATION_SEVERITY.ERROR,
17
- message: `Filing category with the same name '{name}' already exists`,
17
+ message: `Filing category with the same name {name} already exists`,
18
18
  params: ['name'],
19
19
  affectedFields: ['filingCategory'],
20
20
  },
@@ -8,7 +8,7 @@ export const INCOME_ACCOUNTS = defineValidationFeatureMessages({
8
8
  },
9
9
  NAME_ALREADY_EXISTS: {
10
10
  severity: VALIDATION_SEVERITY.ERROR,
11
- message: "Income account with the name '{name}' already exists",
11
+ message: 'Income account with the name {name} already exists',
12
12
  params: ['name'],
13
13
  affectedFields: ['name'],
14
14
  },
@@ -3,13 +3,13 @@ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validat
3
3
  export const ROLES_AND_PERMISSIONS = defineValidationFeatureMessages({
4
4
  ROLE_ALREADY_EXISTS: {
5
5
  severity: VALIDATION_SEVERITY.ERROR,
6
- message: `Role with name '{name}' already exists`,
6
+ message: `Role with name {name} already exists`,
7
7
  params: ['name'],
8
8
  affectedFields: ['name'],
9
9
  },
10
10
  PERMISSION_ALREADY_EXISTS: {
11
11
  severity: VALIDATION_SEVERITY.ERROR,
12
- message: `Permission with name '{name}' already exists`,
12
+ message: `Permission with name {name} already exists`,
13
13
  params: ['name'],
14
14
  affectedFields: ['name'],
15
15
  },
@@ -33,7 +33,7 @@ export const ROLES_AND_PERMISSIONS = defineValidationFeatureMessages({
33
33
  },
34
34
  ROLE_HAS_ASSIGNED_USERS: {
35
35
  severity: VALIDATION_SEVERITY.ERROR,
36
- message: `Cannot delete role with name '{roleName}' because it has users assigned to it`,
36
+ message: `Cannot delete role with name {roleName} because it has users assigned to it`,
37
37
  params: ['roleName'],
38
38
  affectedFields: [],
39
39
  },
@@ -14,7 +14,7 @@ export const STATES = defineValidationFeatureMessages({
14
14
  },
15
15
  NAME_ALREADY_EXISTS: {
16
16
  severity: VALIDATION_SEVERITY.ERROR,
17
- message: `State with the same name '{name}' already exists`,
17
+ message: `State with the same name {name} already exists`,
18
18
  params: ['name'],
19
19
  affectedFields: ['name'],
20
20
  },
@@ -42,13 +42,13 @@ export const STATES = defineValidationFeatureMessages({
42
42
  },
43
43
  STATE_PARENT_TYPE_NOT_ALLOWED: {
44
44
  severity: VALIDATION_SEVERITY.ERROR,
45
- message: `There must be a nation associated with the state '{stateName}'. Please select a nation to proceed.`,
45
+ message: `There must be a nation associated with the state {stateName}. Please select a nation to proceed.`,
46
46
  params: ['stateName'],
47
47
  affectedFields: ['parent'],
48
48
  },
49
49
  CITY_PARENT_TYPE_NOT_ALLOWED: {
50
50
  severity: VALIDATION_SEVERITY.ERROR,
51
- message: `There must be a state associated with the city '{cityName}'. Please select a state to proceed.`,
51
+ message: `There must be a state associated with the city {cityName}. Please select a state to proceed.`,
52
52
  params: ['cityName'],
53
53
  affectedFields: ['parent'],
54
54
  },
@@ -84,7 +84,7 @@ export const TEMPLATE_ASSIGNMENTS = defineValidationFeatureMessages({
84
84
  },
85
85
  ASSIGNMENTS_ORDER_NOT_CONSECUTIVE: {
86
86
  severity: VALIDATION_SEVERITY.ERROR,
87
- message: 'Assignment orders must be consecutive starting from 1. Expected orders: {expected}',
87
+ message: `Assignment orders must be consecutive starting from 1. Expected orders: {expected}`,
88
88
  params: ['expected'],
89
89
  affectedFields: ['assignments'],
90
90
  },
@@ -8,7 +8,7 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
8
8
  },
9
9
  NAME_ALREADY_EXISTS: {
10
10
  severity: VALIDATION_SEVERITY.ERROR,
11
- message: "Template with the name '{name}' already exists",
11
+ message: 'Template with the name {name} already exists',
12
12
  params: ['name'],
13
13
  affectedFields: ['name'],
14
14
  },
@@ -137,22 +137,19 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
137
137
  },
138
138
  STATE_MISMATCH_WITH_ASSOCIATED_SUB_ENTITY_FILINGS: {
139
139
  severity: VALIDATION_SEVERITY.ERROR,
140
- message:
141
- 'This template is linked to sub-entity filing templates that are set to {subEntityTemplateState} state, which conflicts with the selected state. Please update the state before saving.',
140
+ message: `This template is linked to sub-entity filing templates that are set to {subEntityTemplateState} state, which conflicts with the selected state. Please update the state before saving.`,
142
141
  params: ['subEntityTemplateState'],
143
142
  affectedFields: ['state'],
144
143
  },
145
144
  STATE_MISMATCH_WITH_ASSOCIATED_TAX_PAYMENTS: {
146
145
  severity: VALIDATION_SEVERITY.ERROR,
147
- message:
148
- 'This template has associated tax payments that are set to {taxPaymentTemplateState} state, which conflicts with the selected state. Please update the state before saving.',
146
+ message: `This template has associated tax payments that are set to {taxPaymentTemplateState} state, which conflicts with the selected state. Please update the state before saving.`,
149
147
  params: ['taxPaymentTemplateState'],
150
148
  affectedFields: ['state'],
151
149
  },
152
150
  STATE_MISMATCH_WITH_PARENT_FILING: {
153
151
  severity: VALIDATION_SEVERITY.ERROR,
154
- message:
155
- 'This template is filing under a parent that is set to {parentFilingTemplateState}, which conflicts with the selected state. Please update the state before saving.',
152
+ message: `This template is filing under a parent that is set to {parentFilingTemplateState}, which conflicts with the selected state. Please update the state before saving.`,
156
153
  params: ['parentFilingTemplateState'],
157
154
  affectedFields: ['state'],
158
155
  },
@@ -201,29 +198,25 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
201
198
  },
202
199
  FILES_UNDER_MUST_BE_INCOME_TAX: {
203
200
  severity: VALIDATION_SEVERITY.ERROR,
204
- message:
205
- "A parent filing must be an 'Income tax' filing. {parentName} is set to {parentFilingType}. Please select a parent filing with 'Filing type' set to 'Income tax'.",
201
+ message: `A parent filing must be an 'Income tax' filing. {parentName} is set to {parentFilingType}. Please select a parent filing with 'Filing type' set to 'Income tax'.`,
206
202
  params: ['parentName', 'parentFilingType'],
207
203
  affectedFields: ['filesUnder'],
208
204
  },
209
205
  FILES_UNDER_MUST_HAVE_ANNUAL_RECURRENCE: {
210
206
  severity: VALIDATION_SEVERITY.ERROR,
211
- message:
212
- 'A parent filing must be on an annual recurrence. {parentName} does not have an annual recurrence setup. Please add an annual recurrence for {parentName}, or select a different parent filing.',
207
+ message: `A parent filing must be on an annual recurrence. {parentName} does not have an annual recurrence setup. Please add an annual recurrence for {parentName}, or select a different parent filing.`,
213
208
  params: ['parentName'],
214
209
  affectedFields: ['filesUnder'],
215
210
  },
216
211
  FILES_UNDER_PARENT_STATE_MISMATCH: {
217
212
  severity: VALIDATION_SEVERITY.ERROR,
218
- message:
219
- "{parentFilingTemplateName} is set to {parentFilingState} state, which conflicts with this filing template's state. Please select a different parent template or update the state before saving.",
213
+ message: `{parentFilingTemplateName} is set to {parentFilingState} state, which conflicts with this filing template's state. Please select a different parent template or update the state before saving.`,
220
214
  params: ['parentFilingTemplateName', 'parentFilingState'],
221
215
  affectedFields: ['filesUnder'],
222
216
  },
223
217
  PARENT_FILING_CANNOT_FILE_UNDER_PARENT: {
224
218
  severity: VALIDATION_SEVERITY.ERROR,
225
- message:
226
- "{parentFilingTemplateName} is set as 'Filing under parent' and cannot be a parent template. Please select a different parent template.",
219
+ message: `{parentFilingTemplateName} is set as 'Filing under parent' and cannot be a parent template. Please select a different parent template.`,
227
220
  params: ['parentFilingTemplateName'],
228
221
  affectedFields: ['filesUnder'],
229
222
  },
@@ -244,36 +237,31 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
244
237
  },
245
238
  TAX_PAYMENT_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
246
239
  severity: VALIDATION_SEVERITY.ERROR,
247
- message:
248
- 'Tax payments can only be associated with filings on an annual recurrence. {filingTemplateName} is not set to recur annually. Please add an annual recurrence to {filingTemplateName}, or select a different filing template.',
240
+ message: `Tax payments can only be associated with filings on an annual recurrence. {filingTemplateName} is not set to recur annually. Please add an annual recurrence to {filingTemplateName}, or select a different filing template.`,
249
241
  params: ['filingTemplateName'],
250
242
  affectedFields: ['taxPaymentFiling'],
251
243
  },
252
244
  TAX_PAYMENT_FILING_MUST_BE_INCOME_TAX: {
253
245
  severity: VALIDATION_SEVERITY.ERROR,
254
- message:
255
- 'A tax payment must be associated with an income tax filing. {filingTemplateName} is set to {filingTemplateFilingType}. Please select a filing template with filing type set to income tax.',
246
+ message: `A tax payment must be associated with an income tax filing. {filingTemplateName} is set to {filingTemplateFilingType}. Please select a filing template with filing type set to income tax.`,
256
247
  params: ['filingTemplateName', 'filingTemplateFilingType'],
257
248
  affectedFields: ['taxPaymentFiling'],
258
249
  },
259
250
  TAX_PAYMENT_FILING_STATE_MISMATCH: {
260
251
  severity: VALIDATION_SEVERITY.ERROR,
261
- message:
262
- "{filingTemplateName} is set to {filingTemplateState}, which conflicts with this template's state. Please select a different filing template or update the state before saving.",
252
+ message: `{filingTemplateName} is set to {filingTemplateState}, which conflicts with this template's state. Please select a different filing template or update the state before saving.`,
263
253
  params: ['filingTemplateName', 'filingTemplateState'],
264
254
  affectedFields: ['taxPaymentFiling'],
265
255
  },
266
256
  TAX_PAYMENT_FILING_MUST_FILE_SEPARATELY: {
267
257
  severity: VALIDATION_SEVERITY.ERROR,
268
- message:
269
- "Tax payments can only be associated with filings that file separately. {filingTemplateName} is set as 'Filing under parent'. Please select a different filing template.",
258
+ message: `Tax payments can only be associated with filings that file separately. {filingTemplateName} is set as 'Filing under parent'. Please select a different filing template.`,
270
259
  params: ['filingTemplateName'],
271
260
  affectedFields: ['taxPaymentFiling'],
272
261
  },
273
262
  TAX_PAYMENT_FILING_ASSOCIATED_ENTITIES_MISMATCH: {
274
263
  severity: VALIDATION_SEVERITY.ERROR,
275
- message:
276
- "{filingTemplateName} is set to {filingTemplateAssociatedEntities}, which conflicts with this template's associated entities. Please update the associated entities before saving.",
264
+ message: `{filingTemplateName} is set to {filingTemplateAssociatedEntities}, which conflicts with this template's associated entities. Please update the associated entities before saving.`,
277
265
  params: ['filingTemplateName', 'filingTemplateAssociatedEntities'],
278
266
  affectedFields: ['taxPaymentFiling'],
279
267
  },
@@ -294,22 +282,19 @@ export const TEMPLATE_INFORMATION = defineValidationFeatureMessages({
294
282
  },
295
283
  MAIN_FILING_MUST_BE_INCOME_TAX: {
296
284
  severity: VALIDATION_SEVERITY.ERROR,
297
- message:
298
- 'A main filing must be an income tax filing. {mainFilingName} is set to {mainFilingFilingType}. Please select a filing template with filing type set to income tax.',
285
+ message: `A main filing must be an income tax filing. {mainFilingName} is set to {mainFilingFilingType}. Please select a filing template with filing type set to income tax.`,
299
286
  params: ['mainFilingName', 'mainFilingFilingType'],
300
287
  affectedFields: ['taxPaymentFiling'],
301
288
  },
302
289
  MAIN_FILING_MUST_FILE_SEPARATELY: {
303
290
  severity: VALIDATION_SEVERITY.ERROR,
304
- message:
305
- "Tax payments can only be associated with filings that file separately. {mainFilingName} is set as 'Filing under parent'. Please select a different filing template.",
291
+ message: `Tax payments can only be associated with filings that file separately. {mainFilingName} is set as 'Filing under parent'. Please select a different filing template.`,
306
292
  params: ['mainFilingName'],
307
293
  affectedFields: ['taxPaymentFiling'],
308
294
  },
309
295
  MAIN_FILING_MUST_HAVE_ANNUAL_RECURRENCE: {
310
296
  severity: VALIDATION_SEVERITY.ERROR,
311
- message:
312
- 'Tax payments can only be associated with filings on an annual recurrence. {mainFilingName} is not set to recur annually. Please add an annual recurrence to {mainFilingName}, or select a different filing template.',
297
+ message: `Tax payments can only be associated with filings on an annual recurrence. {mainFilingName} is not set to recur annually. Please add an annual recurrence to {mainFilingName}, or select a different filing template.`,
313
298
  params: ['mainFilingName'],
314
299
  affectedFields: ['taxPaymentFiling'],
315
300
  },
@@ -18,8 +18,7 @@ export const TEMPLATE_RECURRENCE_SETTINGS = defineValidationFeatureMessages({
18
18
  },
19
19
  RECURRENCE_FREQUENCY_ALREADY_EXISTS: {
20
20
  severity: VALIDATION_SEVERITY.ERROR,
21
- message:
22
- 'Each recurrence frequency can only be added to a template once. A recurrence for {recurrenceFrequency} already exists. Please edit that recurrence setup, or change the recurrence frequency selected here before saving.',
21
+ message: `Each recurrence frequency can only be added to a template once. A recurrence for {recurrenceFrequency} already exists. Please edit that recurrence setup, or change the recurrence frequency selected here before saving.`,
23
22
  params: ['recurrenceFrequency'],
24
23
  affectedFields: ['recurrenceFrequencyId'],
25
24
  },
@@ -31,8 +30,7 @@ export const TEMPLATE_RECURRENCE_SETTINGS = defineValidationFeatureMessages({
31
30
  },
32
31
  BASED_ON_MUST_BE_PERIOD: {
33
32
  severity: VALIDATION_SEVERITY.ERROR,
34
- message:
35
- "A {templateType} template recurrence must always be based on 'Period'. Please update your selection before saving.",
33
+ message: `A {templateType} template recurrence must always be based on 'Period'. Please update your selection before saving.`,
36
34
  params: ['templateType'],
37
35
  affectedFields: ['basedOn'],
38
36
  },
@@ -43,8 +41,7 @@ export const TEMPLATE_RECURRENCE_SETTINGS = defineValidationFeatureMessages({
43
41
  },
44
42
  BASED_ON_MUST_BE_DATE: {
45
43
  severity: VALIDATION_SEVERITY.ERROR,
46
- message:
47
- "A {templateType} template recurrence must always be based on 'Date'. Please update your selection before saving.",
44
+ message: `A {templateType} template recurrence must always be based on 'Date'. Please update your selection before saving.`,
48
45
  params: ['templateType'],
49
46
  affectedFields: ['basedOn'],
50
47
  },
@@ -164,7 +161,7 @@ export const TEMPLATE_RECURRENCE_SETTINGS = defineValidationFeatureMessages({
164
161
  },
165
162
  DAY_EXCEEDS_MONTH_MAX: {
166
163
  severity: VALIDATION_SEVERITY.ERROR,
167
- message: `Day '{dayOfMonth}' is not valid for '{monthName}'. The maximum allowed day is '{maxDays}'.`,
164
+ message: `Day {dayOfMonth} is not valid for {monthName}. The maximum allowed day is {maxDays}.`,
168
165
  params: ['dayOfMonth', 'monthName', 'maxDays'],
169
166
  affectedFields: ['dayOfMonth'],
170
167
  },
@@ -185,14 +182,13 @@ export const TEMPLATE_RECURRENCE_SETTINGS = defineValidationFeatureMessages({
185
182
  },
186
183
  RECURRENCE_REQUIRED_FOR_TEMPLATE_TYPE: {
187
184
  severity: VALIDATION_SEVERITY.ERROR,
188
- message: `A '{templateType}' template must have a recurrence set up. Please add a recurrence before saving.`,
185
+ message: `A {templateType} template must have a recurrence set up. Please add a recurrence before saving.`,
189
186
  params: ['templateType'],
190
187
  affectedFields: ['recurrenceSettings'],
191
188
  },
192
189
  FILES_UNDER_INHERITS_PARENT_ANNUAL_RECURRENCE: {
193
190
  severity: VALIDATION_SEVERITY.ERROR,
194
- message:
195
- 'This template files under {parentName} and inherits its annual recurrence schedule. Recurrence settings cannot be added or edited here.',
191
+ message: `This template files under {parentName} and inherits its annual recurrence schedule. Recurrence settings cannot be added or edited here.`,
196
192
  params: ['parentName'],
197
193
  affectedFields: ['recurrenceSettings'],
198
194
  },
@@ -3,7 +3,7 @@ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validat
3
3
  export const USER_PREFERENCES = defineValidationFeatureMessages({
4
4
  FEATURE_DOES_NOT_EXIST: {
5
5
  severity: VALIDATION_SEVERITY.ERROR,
6
- message: `Feature with name '{feature}' does not exist`,
6
+ message: `Feature with name {feature} does not exist`,
7
7
  params: ['feature'],
8
8
  affectedFields: ['feature'],
9
9
  },
@@ -3,13 +3,13 @@ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validat
3
3
  export const USERS = defineValidationFeatureMessages({
4
4
  USERNAME_DOES_NOT_EXIST: {
5
5
  severity: VALIDATION_SEVERITY.ERROR,
6
- message: `User with username '{username}' does not exist.`,
6
+ message: `User with username {username} does not exist.`,
7
7
  params: ['username'],
8
8
  affectedFields: ['userName'],
9
9
  },
10
10
  INVALID_PASSWORD: {
11
11
  severity: VALIDATION_SEVERITY.ERROR,
12
- message: `User with username '{username}' password does not match.`,
12
+ message: `User with username {username} password does not match.`,
13
13
  params: ['username'],
14
14
  affectedFields: ['password'],
15
15
  },
@@ -30,13 +30,13 @@ export const USERS = defineValidationFeatureMessages({
30
30
  },
31
31
  USERNAME_ALREADY_EXISTS: {
32
32
  severity: VALIDATION_SEVERITY.ERROR,
33
- message: `User with username '{username}' already exists`,
33
+ message: `User with username {username} already exists`,
34
34
  params: ['username'],
35
35
  affectedFields: ['userName'],
36
36
  },
37
37
  EMAIL_ALREADY_EXISTS: {
38
38
  severity: VALIDATION_SEVERITY.ERROR,
39
- message: `User with email '{email}' already exists`,
39
+ message: `User with email {email} already exists`,
40
40
  params: ['email'],
41
41
  affectedFields: ['email'],
42
42
  },
@@ -59,7 +59,7 @@ export const USERS = defineValidationFeatureMessages({
59
59
  },
60
60
  USER_HAS_REFERENCED_DATA: {
61
61
  severity: VALIDATION_SEVERITY.ERROR,
62
- message: `User '{fullName}' cannot be deleted because they are referenced by existing records.`,
62
+ message: `User {fullName} cannot be deleted because they are referenced by existing records.`,
63
63
  params: ['fullName'],
64
64
  affectedFields: ['userId'],
65
65
  },
@@ -1,6 +1,14 @@
1
1
  import { VALIDATION_MESSAGES } from './validation-messages';
2
2
  import { ValidationMessageDefinition, ValidationSeverity } from './validation-message.types';
3
3
 
4
+ const escapeHtml = (text: string): string =>
5
+ text
6
+ .replaceAll('&', '&')
7
+ .replaceAll('<', '&lt;')
8
+ .replaceAll('>', '&gt;')
9
+ .replaceAll('"', '&quot;')
10
+ .replaceAll("'", '&#x27;');
11
+
4
12
  type Features = keyof typeof VALIDATION_MESSAGES;
5
13
  type ErrorType<F extends Features> = keyof (typeof VALIDATION_MESSAGES)[F];
6
14
  type ErrorMessageParams<F extends Features, E extends ErrorType<F>> = (typeof VALIDATION_MESSAGES)[F][E] extends {
@@ -64,7 +72,7 @@ export const getValidationMessage = <FeatureType extends Features, FeatureErrorT
64
72
  }
65
73
 
66
74
  expectedParams.forEach((param) => {
67
- message = message.replaceAll(`{${param}}`, (inputParams as Record<string, string>)[param]);
75
+ message = message.replaceAll(`{${param}}`, `<b>${escapeHtml((inputParams as Record<string, string>)[param])}</b>`);
68
76
  });
69
77
 
70
78
  return {