11namespace  DigitalLearningSolutions . Web . Helpers 
22{ 
3-     using  System . Text . RegularExpressions ; 
3+     using  DocumentFormat . OpenXml . ExtendedProperties ; 
4+     using  DocumentFormat . OpenXml . Spreadsheet ; 
45    using  Microsoft . AspNetCore . Mvc . ModelBinding ; 
6+     using  Microsoft . CodeAnalysis ; 
7+     using  System . Diagnostics . Metrics ; 
8+     using  System . Text . RegularExpressions ; 
59
610    public  class  ProfessionalRegistrationNumberHelper 
711    { 
@@ -40,11 +44,11 @@ public static void ValidateProfessionalRegistrationNumber(
4044                return ; 
4145            } 
4246
43-             if  ( prn . Length  <  5  ||  prn . Length  >  20 ) 
47+             if  ( prn . Length  <  4  ||  prn . Length  >  20 ) 
4448            { 
4549                modelState . AddModelError ( 
4650                    "ProfessionalRegistrationNumber" , 
47-                     "Professional registration number must be between 5  and 20 characters" 
51+                     "Professional registration number must be between 4  and 20 characters" 
4852                ) ; 
4953            } 
5054
@@ -54,7 +58,9 @@ public static void ValidateProfessionalRegistrationNumber(
5458            { 
5559                modelState . AddModelError ( 
5660                    "ProfessionalRegistrationNumber" , 
57-                     "Invalid professional registration number format - Only alphanumeric characters (a-z, A-Z and 0-9) and hyphens (-) allowed" 
61+                     "Invalid professional registration number format. Accepted formats are: 1–2 letters followed by 6 digits (e.g., AB123456)" + 
62+                     " 4–8 digits only " + "Optional ‘P’ followed by 5–6 digits ‘C’ or ‘P’ followed by 6 digits " + 
63+                     "Optional letter followed by 5–6 digits ‘L’ followed by 4–6 digits 2 digits, hyphen, then 4–5 alphanumeric characters" 
5864                ) ; 
5965            } 
6066        } 
0 commit comments