Skip to content

Commit 36b6bdf

Browse files
authored
fix: dtoss 10107 fix poscode validation rule (#1470)
* DTOSS-10107 fix rule 30 * DTOSS-10107 unit test added * DTOSS-10107 resolve PR comments * DTOSS-10107 fix outpost issue
1 parent 20d2e41 commit 36b6bdf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

application/CohortManager/src/Functions/Shared/Common/ValidationHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public static bool ValidatePostcode(string postcode)
109109
/// </remarks>
110110
public static string? ParseOutcode(string postcode)
111111
{
112+
if (postcode == "ZZZSECUR")
113+
{
114+
return postcode;
115+
}
116+
112117
string pattern = @"^([A-Za-z][A-Za-z]?[0-9][A-Za-z0-9]?) ?[0-9][A-Za-z]{2}$";
113118

114119
Match match = Regex.Match(postcode, pattern, RegexOptions.IgnoreCase, TimeSpan.FromSeconds(2));

0 commit comments

Comments
 (0)