Skip to content

Conversation

sherif-olaboye
Copy link
Contributor

@sherif-olaboye sherif-olaboye commented Aug 21, 2025

JIRA link

https://hee-tis.atlassian.net/browse/TD-4624

Description

I swapped out the pattern string for the .NET regex that validates professional registration numbers.
I updated the test data to match the new pattern so the tests pass, and I revised the error message to reflect the updated allowed format.

Screenshots

image ----- ### Developer checks (Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the IDE auto formatter on all files I’ve worked on and made sure there are no IDE errors relating to them
  • Written or updated tests for the changes (accessibility ui tests for views, tests for controller, data services, services, view models created or modified) and made sure all tests are passing
  • Manually tested my work with and without JavaScript (adding notes where functionality requires JavaScript)
  • Tested any Views or partials created or changed with Wave Chrome plugin. Addressed any valid accessibility issues and documented any invalid errors
  • Updated my Jira ticket with testing notes, including information about other parts of the system that were touched as part of the MR and need to be tested to ensure nothing is broken
  • Scanned over my pull request in GitHub and addressed any warnings from the GitHub Build and Test checks in the GitHub PR ‘Files Changed’ tab
    Either:
  • Documented my work in Confluence, updating any business rules applied or modified. Updated GitHub readme/documentation for the repository if appropriate. List of documentation links added/changed:
  • Confirmed that none of the work that I have undertaken requires any updates to documentation

[TestCase(
"01234_",
"Invalid professional registration number format - Only alphanumeric characters (a-z, A-Z and 0-9) and hyphens (-) allowed"
"Invalid professional registration number format. " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should assign this to a variable rather than repeating it in code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@kevwhitt-hee kevwhitt-hee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assign the error string to a variable and reference it, rather than repeating it throughout code, please?

…/Features/TD-4624-Addregexvalidationofprofessionalregistrationnumberfieldthroughouttheapplication
@sherif-olaboye
Copy link
Contributor Author

Can we assign the error string to a variable and reference it, rather than repeating it throughout code, please?

Done

@kevwhitt-hee kevwhitt-hee merged commit d5b19a4 into DLS-Release-v1.2.3 Sep 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants