department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 202 forks source link

Fix validation of champva member number #91733

Closed michaelclement closed 1 month ago

michaelclement commented 1 month ago

The member number validation on the frontend does not match that on the backend. We need to fix this asap as it causes form submissions to fail.

michaelclement commented 1 month ago

The member number on claims is technically supposed to be a social security number, but in the future the team that controls this process is going to switch to using a value that isn't the SSN.

Our problem is that we left the normal SSN validation off this field (because technically in future it may not be an SSN), but the validation we do have is not consistent with what the backend is checking.

The backend validates that we have 8-9 characters (all numbers). We allow more characters than that on the frontend.

michaelclement commented 1 month ago

Work done in this PR. Waiting on:

michaelclement commented 1 month ago

The above PR ensures that the front-end validation agrees with the backend validation. Whether or not we will change that validation in the future depends on policy decisions (i.e., keep the SSN formatting, use something new that matches whatever the new member structure is - waiting on stakeholder input).

This is meant to keep our current experience from breaking and can be revisited in the future when those decisions have been made.

michaelclement commented 1 month ago

@marywang2 The above fix has been merged. Changes should be visible on staging shortly. Thanks!

michaelclement commented 1 month ago
screen
Too short Screenshot 2024-08-28 at 11.42.24.png
Numbers only Screenshot 2024-08-28 at 11.42.45.png
Too long (users are not able to enter more than 9 digits)
marywang2 commented 1 month ago

We will need to revisit error messaging with CAIA but can do in another ticket.