VA Forms System Core will be a React library hosted in NPM that will allow engineers and designers to easily interact with Forms inside of vets-website.
Recently vets schema for burial form was updated in production where veteranServedUnderAnotherName and benefitsSelection were removed.
The value of this two fields are only required for form validation and not when we submit the form to vets api. So we want to remove this fields before we submit to vets api.
Proposed Solution
Compare initial values with the values right before the form submission and remove the keys which are not present in initial values. (There are certain fields which are required and are not in the initial values so check if initial value is source of truth)
Acceptance Criteria
[ ] Fields purely for UI validation purpose are removed from the formik object when data is transformed right before submit
Description
Recently vets schema for burial form was updated in production where
veteranServedUnderAnotherName
andbenefitsSelection
were removed.The value of this two fields are only required for form validation and not when we submit the form to vets api. So we want to remove this fields before we submit to vets api.
Proposed Solution
Compare initial values with the values right before the form submission and remove the keys which are not present in initial values. (There are certain fields which are required and are not in the initial values so check if initial value is source of truth)
Acceptance Criteria