Class ValidationConstants
public static class ValidationConstants
- Inheritance
-
ValidationConstants
- Inherited Members
Fields
ChannelNamePattern
public const string ChannelNamePattern = "^[a-zA-Z0-9_-]{2,100}$"
Field Value
HexColorPattern
public const string HexColorPattern = "^#[0-9a-fA-F]{6}$"
Field Value
MaxBioLength
public const int MaxBioLength = 500
Field Value
MaxChannelTopicLength
public const int MaxChannelTopicLength = 500
Field Value
MaxDisplayNameLength
public const int MaxDisplayNameLength = 100
Field Value
MaxHistoryCount
public const int MaxHistoryCount = 200
Field Value
MaxPasswordLength
public const int MaxPasswordLength = 128
Field Value
MaxStatusMessageLength
public const int MaxStatusMessageLength = 100
Field Value
UsernamePattern
public const string UsernamePattern = "^[a-zA-Z0-9_-]{3,50}$"
Field Value
Methods
ChannelNameRegex()
[GeneratedRegex("^[a-zA-Z0-9_-]{2,100}$")]
public static Regex ChannelNameRegex()
Returns
- Regex
Remarks
Pattern:
^[a-zA-Z0-9_-]{2,100}$Explanation:
○ Match if at the beginning of the string.
○ Match a character in the set [\-0-9A-Z_a-z] atomically at least 2 and at most 100 times.
○ Match if at the end of the string or if before an ending newline.
HexColorRegex()
[GeneratedRegex("^#[0-9a-fA-F]{6}$")]
public static Regex HexColorRegex()
Returns
- Regex
Remarks
Pattern:
^#[0-9a-fA-F]{6}$Explanation:
○ Match if at the beginning of the string.
○ Match '#'.
○ Match a hexadecimal digit exactly 6 times.
○ Match if at the end of the string or if before an ending newline.
UsernameRegex()
[GeneratedRegex("^[a-zA-Z0-9_-]{3,50}$")]
public static Regex UsernameRegex()
Returns
- Regex
Remarks
Pattern:
^[a-zA-Z0-9_-]{3,50}$Explanation:
○ Match if at the beginning of the string.
○ Match a character in the set [\-0-9A-Z_a-z] atomically at least 3 and at most 50 times.
○ Match if at the end of the string or if before an ending newline.