diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/Address.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/Address.tsx index bdc208f06bdc..52c65d448353 100644 --- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/Address.tsx +++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/Address.tsx @@ -35,10 +35,9 @@ const INPUT_KEYS = { }; const STEP_FIELDS = [personalInfoStepKey.STREET, personalInfoStepKey.CITY, personalInfoStepKey.STATE, personalInfoStepKey.ZIP_CODE]; -const REQUIRED_FIELDS = STEP_FIELDS; const validate = (values: FormValues): OnyxCommon.Errors => { - const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); + const errors = ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS); if (values.requestorAddressStreet && !ValidationUtils.isValidAddress(values.requestorAddressStreet)) { errors.requestorAddressStreet = 'bankAccount.error.addressStreet'; diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx index 982b076d0242..d436c73c8342 100644 --- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx +++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/DateOfBirth.tsx @@ -30,10 +30,9 @@ type DateOfBirthProps = DateOfBirthOnyxProps & SubStepProps; const personalInfoDobKey = CONST.BANK_ACCOUNT.PERSONAL_INFO_STEP.INPUT_KEY.DOB; const STEP_FIELDS = [personalInfoDobKey]; -const REQUIRED_FIELDS = STEP_FIELDS; const validate = (values: FormValues): OnyxCommon.Errors => { - const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); + const errors = ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS); if (values.dob) { if (!ValidationUtils.isValidPastDate(values.dob) || !ValidationUtils.meetsMaximumAgeRequirement(values.dob)) { diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx index 4ba45d4f7c5b..a5c54c5ac09c 100644 --- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx +++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/FullName.tsx @@ -28,9 +28,8 @@ type FullNameProps = FullNameOnyxProps & SubStepProps; const personalInfoStepKey = CONST.BANK_ACCOUNT.PERSONAL_INFO_STEP.INPUT_KEY; const STEP_FIELDS = [personalInfoStepKey.FIRST_NAME, personalInfoStepKey.LAST_NAME]; -const REQUIRED_FIELDS = STEP_FIELDS; -const validate = (values: FormValues): OnyxCommon.Errors => ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); +const validate = (values: FormValues): OnyxCommon.Errors => ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS); function FullName({reimbursementAccount, onNext, isEditing}: FullNameProps) { const {translate} = useLocalize(); diff --git a/src/pages/ReimbursementAccount/PersonalInfo/substeps/SocialSecurityNumber.tsx b/src/pages/ReimbursementAccount/PersonalInfo/substeps/SocialSecurityNumber.tsx index 5bdee9e4a137..a781f8d8aa14 100644 --- a/src/pages/ReimbursementAccount/PersonalInfo/substeps/SocialSecurityNumber.tsx +++ b/src/pages/ReimbursementAccount/PersonalInfo/substeps/SocialSecurityNumber.tsx @@ -27,10 +27,9 @@ type SocialSecurityNumberProps = SocialSecurityNumberOnyxProps & SubStepProps; const personalInfoStepKey = CONST.BANK_ACCOUNT.PERSONAL_INFO_STEP.INPUT_KEY; const STEP_FIELDS = [personalInfoStepKey.SSN_LAST_4]; -const REQUIRED_FIELDS = STEP_FIELDS; const validate = (values: FormValues): OnyxCommon.Errors => { - const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS); + const errors = ValidationUtils.getFieldRequiredErrors(values, STEP_FIELDS); if (values.ssnLast4 && !ValidationUtils.isValidSSNLastFour(values.ssnLast4)) { errors.ssnLast4 = 'bankAccount.error.ssnLast4';