mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Improve email settings validation and UX (#3891)
This commit is contained in:
@@ -118,7 +118,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
{
|
||||
if (request.Email is null)
|
||||
ModelState.AddModelError(nameof(request.Email), "Email is missing");
|
||||
if (!string.IsNullOrEmpty(request.Email) && !Validation.EmailValidator.IsEmail(request.Email))
|
||||
if (!string.IsNullOrEmpty(request.Email) && !MailboxAddressValidator.IsMailboxAddress(request.Email))
|
||||
{
|
||||
ModelState.AddModelError(nameof(request.Email), "Invalid email");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user