2023-02-19 00:43:43 +01:00
|
|
|
namespace PrivaPub.ClientModels
|
2023-02-18 08:52:17 +01:00
|
|
|
{
|
|
|
|
|
public static class Constants
|
|
|
|
|
{
|
2023-02-19 00:43:43 +01:00
|
|
|
public const int MaxAvatarNameLength = 32;
|
|
|
|
|
public const int MaxAvatarBiographyLength = 5_000;
|
2023-02-18 08:52:17 +01:00
|
|
|
public const int MinPasswordLength = 7;
|
|
|
|
|
public const int MaxPasswordLength = 1025;
|
|
|
|
|
public const int GroupInvitationLength = 64;
|
|
|
|
|
|
|
|
|
|
public const string PasswordRegex = @"^(?=.*)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).*$";
|
2026-10-01 17:39:58 +02:00
|
|
|
public const string UserNameRegex = "^[a-z0-9_]+$";
|
2026-10-17 05:57:25 +02:00
|
|
|
// a custom emoji's shortcode: Mastodon's rule (letters, digits and underscores, two at least), 64 at most
|
|
|
|
|
public const string ShortcodeRegex = "^[a-zA-Z0-9_]{2,64}$";
|
2023-02-18 08:52:17 +01:00
|
|
|
}
|
|
|
|
|
}
|