Removed symbol requirement for password, fix formatting.
This commit is contained in:
@@ -38,11 +38,10 @@ internal static class AuthValidator
|
||||
var hasUpper = password.Any(char.IsUpper);
|
||||
var hasLower = password.Any(char.IsLower);
|
||||
var hasDigit = password.Any(char.IsDigit);
|
||||
var hasSymbol = password.Any(ch => !char.IsLetterOrDigit(ch));
|
||||
if (!hasUpper || !hasLower || !hasDigit || !hasSymbol)
|
||||
if (!hasUpper || !hasLower || !hasDigit)
|
||||
{
|
||||
validated = default;
|
||||
error = "Password must include uppercase, lowercase, number, and symbol.";
|
||||
error = "Password must include at least one uppercase and one lowercase characters and and digit.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -95,10 +94,5 @@ internal static class AuthValidator
|
||||
return true;
|
||||
}
|
||||
|
||||
public readonly record struct ValidatedRegistration(
|
||||
string Username,
|
||||
string NormalizedUsername,
|
||||
string DisplayName,
|
||||
string? AdminKey
|
||||
);
|
||||
public readonly record struct ValidatedRegistration(string Username, string NormalizedUsername, string DisplayName, string? AdminKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user