Release 0.8.3: fix DOB-carrier enrollment (date_of_birth nulled on submit) - #107
Merged
Conversation
Members could not connect any carrier whose credential form includes a
Date of Birth field (Medical Mutual, SimplePay Health). The value they
typed was discarded client-side, the backend rejected the submit as
missing a required field with a 422, and the form returned a red
validation error. No input format worked because the value never left
the browser.
EnterCredentials' onSubmit spread the carrier form values and then
re-pinned SDK-controlled fields on top, including
`date_of_birth: values.dateOfBirth || null`. Carrier form values are
keyed by their JSON-schema property name (`date_of_birth`), so the
camelCase lookup was always undefined and the `|| null` overwrote what
the member entered. The line came from 0.7.x, which spread `...formData`
LAST so the real value won; 0.8.0 inverted the order to stop carrier
schemas clobbering payer_id/accept/tenants_accept, which silently turned
this into data loss. Drop the re-pin -- `...values` already carries
date_of_birth -- and keep the payer_id/accept guards.
Also render `format: "date"` properties as a native date input. The
backend's WTForms DateField only parses ISO YYYY-MM-DD, and 0.8.x showed
a bare text box with no format hint.
The React Native hook kept the 0.7.x spread order and is unaffected.
Verified: Medical Mutual's generated schema emits
date_of_birth {type: string, format: date, required: true}; prod nginx
logs show POST /sdk-api/policy_holder_sdk/policy_holder returning 422 on
every attempt, with the view log recording date_of_birth: null on each.
New Medical Mutual policy holders carrying a DOB fell from 100%
(Jan-Apr) to 0/3 in May, 6/59 in June, 2/57 in July -- the cliff lands
on the 0.8.0 release.
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release of 0.8.3. Single fix; dev PR is LakeEriePartners/stream-connect-js-sdk#8.
Fix: carriers that ask for Date of Birth could never be connected
A member connecting a carrier whose credential form includes a Date of Birth field — Medical Mutual and SimplePay Health — could not complete enrollment. Whatever they typed was discarded before the request left the browser, the backend rejected the submission as missing a required field (HTTP 422), and the form came back with a red validation error. No input format worked, because the value never reached the server.
EnterCredentials.onSubmitspread the carrier's form values and then re-pinned SDK-controlled fields on top, includingdate_of_birth: values.dateOfBirth || null. Carrier form values are keyed by their JSON-schema property name —date_of_birth, snake_case — so the camelCase lookup was alwaysundefinedand the|| nulloverwrote the member's input.That line was inherited from 0.7.x, which spread
...formDatalast so the member's value won. 0.8.0 inverted the spread order so carrier schemas can't clobberpayer_id/accept/tenants_accept, which silently promoted a dead line into data loss. The re-pin is gone; thepayer_id/ consent guards are unchanged.Date fields also render as a native date input now. Carrier schemas mark them
{"type": "string", "format": "date"}, which 0.8.x rendered as a bare text box with no format hint even though the backend's WTFormsDateFieldonly parses ISOYYYY-MM-DD.The React Native hook (
stream-connect-sdk-hook) kept the 0.7.x spread order and was never affected.Impact
Introduced in 0.8.0 (2026-05-17), so roughly ten weeks in the field. It stayed invisible because the backend only validates the onboard form when creating a new policy holder — reconnecting an existing one was unaffected.
Measured on Medical Mutual: new policy holders carrying a date of birth ran 100% Jan–Apr (6/6, 7/7, 7/7, 3/3), then fell to 0/3 in May, 6/59 in June, 2/57 in July — the cliff lands on the 0.8.0 release. 184 SDK submissions over the last 60 days across four customers were affected.
Verification
npm run test(biome + tsc) passes. The affected carriers' generated schemas were confirmed to emitdate_of_birth: {type: "string", format: "date", required: true}, so the newdatebranch fires. Both spread orders were replayed against the real value shape to confirm the regression reproduces and the fix corrects it, with thepayer_idguard intact.