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:
@@ -25,12 +25,13 @@ public record Signature([Required] double X, [Required] double Y, [Required] int
|
|||||||
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
|
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
|
||||||
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
|
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
|
||||||
{
|
{
|
||||||
private string? _emailAddress;
|
private string _emailAddress = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// E-Mail-Adresse des Empfängers.
|
/// E-Mail-Adresse des Empfängers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? EmailAddress { get => _emailAddress?.ToLower(); init => _emailAddress = _emailAddress?.ToLower(); }
|
[Required]
|
||||||
|
public string EmailAddress { get => _emailAddress.ToLower(); init => _emailAddress = value.ToLower(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user