chore(backend): format
This commit is contained in:
parent
42041d49bc
commit
aa756ac56a
3 changed files with 4 additions and 2 deletions
|
@ -125,7 +125,7 @@ public class EmailAuthController(
|
|||
|
||||
private void CheckRequirements()
|
||||
{
|
||||
if (!config.DiscordAuth.Enabled)
|
||||
if (!config.EmailAuth.Enabled)
|
||||
throw new ApiError.BadRequest("Email authentication is not enabled on this instance.");
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,8 @@ public class UsersController(
|
|||
|
||||
if (preferences.Count > MaxCustomPreferences)
|
||||
errors.Add(("custom_preferences",
|
||||
ValidationError.LengthError("Too many custom preferences", 0, MaxCustomPreferences, preferences.Count)));
|
||||
ValidationError.LengthError("Too many custom preferences", 0, MaxCustomPreferences,
|
||||
preferences.Count)));
|
||||
if (preferences.Count > 50) return errors;
|
||||
|
||||
// TODO: validate individual preferences
|
||||
|
|
|
@ -289,6 +289,7 @@ public static partial class ValidationUtils
|
|||
|
||||
[GeneratedRegex(@"^[a-zA-Z_0-9\-\.]{2,40}$", RegexOptions.IgnoreCase, "en-NL")]
|
||||
private static partial Regex UsernameRegex();
|
||||
|
||||
[GeneratedRegex("""^[^@'$%&()+<=>^|~`,*!#/\\\[\]""\{\}\?]{1,100}$""", RegexOptions.IgnoreCase, "en-NL")]
|
||||
private static partial Regex MemberRegex();
|
||||
}
|
Loading…
Reference in a new issue