Skip to content

Commit

Permalink
Add remarks to Company regex
Browse files Browse the repository at this point in the history
  • Loading branch information
typecastcloud committed Oct 11, 2024
1 parent ed0f1fc commit 9b3b5c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/framework/Framework.Models/ValidationExpressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ public static class ValidationExpressions
public const string Name = @"^.+$";
public const string Bpn = @"^(BPNL|bpnl)[\w|\d]{12}$";
public const string Bpns = @"^(BPNS|bpns)[\w|\d]{12}$";
/// <summary>
/// Regular expression pattern for validating legal company names.
/// </summary>
/// <remarks>
/// The pattern ensures the following:
/// - unicode category \p{L} for letters, \u0E00-\u0E7F for Thai characters
/// - digits, currency symbols, and various special characters.
/// - The string can have spaces between characters but not at the end.
/// - The length of the string must be between 1 and 160 characters.
/// </remarks>
public const string Company = @"^(?!.*\s$)([\p{L}\u0E00-\u0E7F\d\p{Sc}@%*+_\-/\\,.:;=<>!?&^#'\x22()[\]]\s?){1,160}$";
public const string ExternalCertificateNumber = @"^[a-zA-Z0-9]{0,36}$";
}

0 comments on commit 9b3b5c4

Please sign in to comment.