fix: update display name validation to allow spaces and improve error message

This commit is contained in:
2026-02-01 16:06:14 -05:00
parent 71363fa1a4
commit 755b356d61
@@ -33,7 +33,7 @@ namespace SharpbinV3.Server.DTOs
if (!ValidateDisplayname().IsMatch(DisplayName))
results.Add(new ValidationResult("DisplayName can only contain alphanumeric characters, underscores, periods, and spaces (no leading or trailing spaces).", [nameof(DisplayName)]));
}
if (Email != null)
if (Email != null && Email.Length > 0)
{
var emailAttribute = new EmailAddressAttribute();
if (!emailAttribute.IsValid(Email))