Skip to content

Commit

Permalink
Amended validation to allow NINOs starting with QQ (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
hortha authored Mar 15, 2024
1 parent b24a64c commit 30845d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static bool IsValid(string? value)
return ValidNinoPattern().IsMatch(normalized);
}

[GeneratedRegex("^[A-CEGHJ-PR-TW-Za-ceghj-pr-tw-z]{1}[A-CEGHJ-NPR-TW-Za-ceghj-npr-tw-z]{1}[0-9]{6}[A-DFMa-dfm]{0,1}$")]
[GeneratedRegex("^[A-CEGHJ-PQR-TW-Za-ceghj-pr-tw-z]{1}[A-CEGHJ-NPQR-TW-Za-ceghj-npr-tw-z]{1}[0-9]{6}[A-DFMa-dfm]{0,1}$")]
private static partial Regex ValidNinoPattern();

public static string? NormalizeNationalInsuranceNumber(string? value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static TheoryData<TpsCsvExtractFileImportTestScenarioData> GetImportFileT
{
var validFormatTrn = "1234567";
var invalidFormatTrn = "12345678";
var validFormatNationalInsuranceNumber = Faker.Identification.UkNationalInsuranceNumber();
var validFormatNationalInsuranceNumber = "QQ123456A";
var invalidFormatNationalInsuranceNumber = "1234";
var validFormatDateOfBirth = "01/01/1980";
var invalidFormatDateOfBirth = "1234";
Expand Down

0 comments on commit 30845d1

Please sign in to comment.