diff --git a/src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js b/src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js index f69cfb0b4c13..b7d99dc85fdf 100644 --- a/src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js +++ b/src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js @@ -714,7 +714,7 @@ export const studentAssetsPage = { ), }, otherAssets: textUI('All other assets'), - totalValue: textUI('All other assets'), + totalValue: textUI('Total value'), }, }, schema: { diff --git a/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js index 00a96a41b395..929a30e4fc58 100644 --- a/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js +++ b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js @@ -31,7 +31,7 @@ export const uiSchema = { classNames: 'vads-u-margin-top--4', }), other: textUI({ - title: 'Briefly describe why you live separately', + title: 'Briefly describe why you live separately from your spouse', required: formData => formData?.doesLiveWithSpouse?.currentSpouseReasonForSeparation === 'OTHER', diff --git a/src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js index fe9e4d4e0308..546e4dc42967 100644 --- a/src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js +++ b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js @@ -132,7 +132,6 @@ export const formerMarriageEndReasonPage = { reasonMarriageEndedOther: { ...textUI('Briefly describe how their marriage ended'), 'ui:required': (formData, index) => { - // See above comment const isEditMode = formData?.reasonMarriageEnded === 'Other'; const isAddMode = formData?.spouseMarriageHistory?.[index]?.reasonMarriageEnded === @@ -183,6 +182,24 @@ export const formerMarriageEndDatePage = { endDate: { ...currentOrPastDateUI('When did their marriage end?'), 'ui:required': () => true, + 'ui:validations': [ + { + validator: (errors, _field, formData) => { + const { startDate, endDate } = formData; + + if (!startDate || !endDate) return; + + const start = new Date(startDate); + const end = new Date(endDate); + + if (end < start) { + errors.addError( + 'Marriage end date must be the on or after the marriage start date', + ); + } + }, + }, + ], }, }, schema: { @@ -221,7 +238,6 @@ export const formerMarriageStartLocationPage = { 'ui:title': 'State', 'ui:webComponentField': VaSelectField, 'ui:required': (formData, index) => { - // See above comment const isEditMode = formData?.startLocation?.outsideUsa; const isAddMode = formData?.spouseMarriageHistory?.[index]?.startLocation @@ -231,7 +247,6 @@ export const formerMarriageStartLocationPage = { }, 'ui:options': { hideIf: (formData, index) => - // See above comment formData?.startLocation?.outsideUsa || formData?.spouseMarriageHistory?.[index]?.startLocation ?.outsideUsa, @@ -282,7 +297,6 @@ export const formerMarriageEndLocationPage = { 'ui:title': 'State', 'ui:webComponentField': VaSelectField, 'ui:required': (formData, index) => { - // See above comment const isEditMode = formData?.endLocation?.outsideUsa; const isAddMode = formData?.spouseMarriageHistory?.[index]?.endLocation?.outsideUsa; @@ -291,7 +305,6 @@ export const formerMarriageEndLocationPage = { }, 'ui:options': { hideIf: (formData, index) => - // See above comment formData?.endLocation?.outsideUsa || formData?.spouseMarriageHistory?.[index]?.endLocation?.outsideUsa, }, diff --git a/src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js index b13a06bb9a34..aae0498c05fc 100644 --- a/src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js +++ b/src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js @@ -19,7 +19,7 @@ import VaSelectField from 'platform/forms-system/src/js/web-component-fields/VaS import VaCheckboxField from 'platform/forms-system/src/js/web-component-fields/VaCheckboxField'; import { marriageEnums, - spouseFormerMarriageLabels, + veteranFormerMarriageLabels, customLocationSchema, generateHelpText, } from '../../helpers'; @@ -125,7 +125,7 @@ export const vetFormerMarriageEndReasonPage = { ...radioUI({ title: 'How did your marriage end?', required: () => true, - labels: spouseFormerMarriageLabels, + labels: veteranFormerMarriageLabels, }), }, reasonMarriageEndedOther: { @@ -162,7 +162,7 @@ export const vetFormerMarriageStartDatePage = { return 'Your former marriage'; }), startDate: { - ...currentOrPastDateUI('When did they get married?'), + ...currentOrPastDateUI('When did you get married?'), 'ui:required': () => true, }, }, @@ -180,8 +180,26 @@ export const vetFormerMarriageEndDatePage = { return 'Your former marriage'; }), endDate: { - ...currentOrPastDateUI('When did their marriage end?'), + ...currentOrPastDateUI('When did your marriage end?'), 'ui:required': () => true, + 'ui:validations': [ + { + validator: (errors, _field, formData) => { + const { startDate, endDate } = formData; + + if (!startDate || !endDate) return; + + const start = new Date(startDate); + const end = new Date(endDate); + + if (end < start) { + errors.addError( + 'Marriage end date must be the on or after the marriage start date', + ); + } + }, + }, + ], }, }, schema: { @@ -198,7 +216,7 @@ export const vetFormerMarriageStartLocationPage = { return 'Your former marriage'; }), startLocation: { - 'ui:title': 'Where did they get married?', + 'ui:title': 'Where did you get married?', 'ui:options': { labelHeaderLevel: '4', }, diff --git a/src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js b/src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js index 448109aa2250..6c724c07f045 100644 --- a/src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js +++ b/src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js @@ -91,7 +91,7 @@ export const householdChildInfoPage = { title: 'Remove a stepchild who has left your household', nounSingular: removeChildHouseholdOptions.nounSingular, }), - fullName: fullNameNoSuffixUI(), + fullName: fullNameNoSuffixUI(title => `Child’s ${title}`), ssn: { ...ssnUI('Child’s Social Security number'), 'ui:required': () => true,