Update ReceiverGetOrCreateCommand email handling
Changed _emailAddress from nullable to non-nullable, initialized to an empty string. Updated EmailAddress property to be required, with modified getter and setter to ensure lowercase formatting.
This commit is contained in:
parent
d873d6dcf1
commit
2db0748e60
@ -25,12 +25,13 @@ public record Signature([Required] double X, [Required] double Y, [Required] int
|
||||
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
|
||||
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
|
||||
{
|
||||
private string? _emailAddress;
|
||||
private string _emailAddress = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// E-Mail-Adresse des Empfängers.
|
||||
/// </summary>
|
||||
public string? EmailAddress { get => _emailAddress?.ToLower(); init => _emailAddress = _emailAddress?.ToLower(); }
|
||||
[Required]
|
||||
public string EmailAddress { get => _emailAddress.ToLower(); init => _emailAddress = value.ToLower(); }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user