Skip to content

Commit 5d48f64

Browse files
TD-4624 Add regex validation of professional registration number field throughout the application
1 parent 5d7d524 commit 5d48f64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DigitalLearningSolutions.Web/Helpers/ProfessionalRegistrationNumberHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void ValidateProfessionalRegistrationNumber(
4848
);
4949
}
5050

51-
const string pattern = @"^[a-z\d-]+$";
51+
const string pattern = @"^(\d{7}|[A-Za-z]{1,2}\d{6}|\d{4,8}|P?\d{5,6}|[C|P]\d{6}|[A-Za-z]?\d{5,6}|L\d{4,6}|\d{2}-[A-Za-z\d]{4,5})$";
5252
var rg = new Regex(pattern, RegexOptions.IgnoreCase);
5353
if (!rg.Match(prn).Success)
5454
{

0 commit comments

Comments
 (0)