diff --git a/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.test.tsx b/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.test.tsx index 30df8df6d5..75a65d3d37 100644 --- a/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.test.tsx +++ b/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.test.tsx @@ -165,6 +165,25 @@ describe('MaxAllowableSection', () => { 'Your combined maximum allowable salary exceeds your maximum allowable salary of $125,000.00', ); }); + + it('shows required errors when split cap fields are empty', async () => { + const { findByText } = render( + , + ); + + expect( + await findByText('Maximum Allowable Salary is required'), + ).toBeInTheDocument(); + expect( + await findByText('Spouse Maximum Allowable Salary is required'), + ).toBeInTheDocument(); + }); }); it('shows message to users with exception cap', async () => { diff --git a/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.tsx b/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.tsx index a4b91e39a5..a17d3d9020 100644 --- a/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.tsx +++ b/src/components/HrTools/SalaryCalculator/YourInformation/MaxAllowableSection/MaxAllowableSection.tsx @@ -70,10 +70,12 @@ export const MaxAllowableStep: React.FC = () => { return yup.object({ salaryCap: amount(t('Maximum Allowable Salary'), t, { + required: true, max: calculations?.hardCap, maxMessage, }), spouseSalaryCap: amount(t('Spouse Maximum Allowable Salary'), t, { + required: true, max: calculations?.hardCap, maxMessage, }),