Whilst working on a company number validation issue we identified another one with our intent for the CanStripWhitespace concern.
Each page in the journey is backed by a form which handles setting up the data to display, and validating the answers when the page is submitted.
The concern is some shared code used by all the forms, and it is used to ensure that all the values a user submits are stripped of whitespace before being saved to the database. This is general good practise and prevents issues with mis-interpretation and mis-matches when dealing with the data.
The issue is the main intent was to strip any whitespace before we then do any further processing. The issue is that we are only stripping the whitespace before saving values to the database. We are not stripping them when trying to validate the values.
Hence things like company number validation fails, because it is trying to search companies house with values that includes whitespace, and therefore finding no match.
So this story is about reviewing our intent and current solution and deciding
is the intent still valid and relevant
should we be doing something in addition to what we currently do if it is
should we be doing something instead of what we currently do if it is
Whilst working on a company number validation issue we identified another one with our intent for the CanStripWhitespace concern.
Each page in the journey is backed by a form which handles setting up the data to display, and validating the answers when the page is submitted.
The concern is some shared code used by all the forms, and it is used to ensure that all the values a user submits are stripped of whitespace before being saved to the database. This is general good practise and prevents issues with mis-interpretation and mis-matches when dealing with the data.
The issue is the main intent was to strip any whitespace before we then do any further processing. The issue is that we are only stripping the whitespace before saving values to the database. We are not stripping them when trying to validate the values.
Hence things like company number validation fails, because it is trying to search companies house with values that includes whitespace, and therefore finding no match.
So this story is about reviewing our intent and current solution and deciding