Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmpRef regex was too loose #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OsricWilkinson
Copy link

Per https://www.gov.uk/hmrc-internal-manuals/paye-manual/paye055#employer-reference an employers reference is three digits, a slash, and then numbers and letters. The previous regex was 'not a slash', 'slash', 'not a slash'.
I've also tweaked the test cases since the test data was also wrong (Tax Offices never had five digit references).
Strictly, the second half of the pattern could be '{1,7}' instead of '+'

@hmrc-web-operations hmrc-web-operations changed the base branch from master to main November 16, 2021 11:13
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.

1 participant