From 755b356d616a339273c7e45207304e901617c367 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Sun, 1 Feb 2026 16:06:14 -0500 Subject: [PATCH] fix: update display name validation to allow spaces and improve error message --- SharpbinV3.Server/DTOs/User/RegisterUserDto.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharpbinV3.Server/DTOs/User/RegisterUserDto.cs b/SharpbinV3.Server/DTOs/User/RegisterUserDto.cs index eb21804..3530c96 100644 --- a/SharpbinV3.Server/DTOs/User/RegisterUserDto.cs +++ b/SharpbinV3.Server/DTOs/User/RegisterUserDto.cs @@ -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))