diff --git a/StandManager.MailProcessor/appsettings.json b/StandManager.MailProcessor/appsettings.json
index a7252ef..7a310c7 100644
--- a/StandManager.MailProcessor/appsettings.json
+++ b/StandManager.MailProcessor/appsettings.json
@@ -11,7 +11,7 @@
"AllowedHosts": "*",
"EmailConfig": {
"ServerAddress": "https://mailbridge.gruppodac.eu/api/graph/NewMessageHtml",
- "RangeSize": 3,
+ "RangeSize": 20,
"From": "registrazioni@gruppodac.eu",
"MailSplitCharTo": ";",
"To": "g.vitari@oaservice.it;d.sandrelli@oaservice.it",
diff --git a/StandManager/Components/Pages/Management/Profile.razor b/StandManager/Components/Pages/Management/Profile.razor
index 94aaea5..d131934 100644
--- a/StandManager/Components/Pages/Management/Profile.razor
+++ b/StandManager/Components/Pages/Management/Profile.razor
@@ -31,6 +31,7 @@
Email
+
diff --git a/StandManager/Components/Pages/Management/Utenti_Edit.razor b/StandManager/Components/Pages/Management/Utenti_Edit.razor
index ae5918a..7aa27e6 100644
--- a/StandManager/Components/Pages/Management/Utenti_Edit.razor
+++ b/StandManager/Components/Pages/Management/Utenti_Edit.razor
@@ -39,16 +39,19 @@
Nome
+
Cognome
+
Email
+
diff --git a/StandManager/Components/Pages/Registrazione.razor b/StandManager/Components/Pages/Registrazione.razor
index 5f7e66a..756b1ba 100644
--- a/StandManager/Components/Pages/Registrazione.razor
+++ b/StandManager/Components/Pages/Registrazione.razor
@@ -76,6 +76,11 @@
private async Task OnIscrizioneSave()
{
+ if (!mail.Contains("@"))
+ {
+ await _dialogService.Alert("Inserire un indirizzo Email valido", "Errore", new ConfirmOptions() { OkButtonText = "Ok" });
+ return;
+ }
var exist = await _managerService.MailQueueService.RicercaPer(x => x.ToList.Contains(mail) && !x.Eliminato);
if (exist != null && exist?.Id != Guid.Empty)
{
diff --git a/StandManager/Model/IscrizioneEventoViewModel.cs b/StandManager/Model/IscrizioneEventoViewModel.cs
index e38a8eb..16a6453 100644
--- a/StandManager/Model/IscrizioneEventoViewModel.cs
+++ b/StandManager/Model/IscrizioneEventoViewModel.cs
@@ -1,4 +1,5 @@
using StandManager.Domain.Entita;
+using StandManager.Service.Mail;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -22,6 +23,7 @@ public class IscrizioneEventoViewModel
[Required(ErrorMessage = "Il cognome è obbigatorio")]
public string Cognome { get; set; }
[Required(ErrorMessage = "La E-mail è obbigatoria")]
+ [EmailAddress(ErrorMessage = "Inserisci un indirizzo email valido")]
public string Email { get; set; }
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
public string NumeroTelefono { get; set; }
diff --git a/StandManager/Model/ProfiloViewModel.cs b/StandManager/Model/ProfiloViewModel.cs
index 44a7ae7..7457f4f 100644
--- a/StandManager/Model/ProfiloViewModel.cs
+++ b/StandManager/Model/ProfiloViewModel.cs
@@ -40,6 +40,7 @@ public class ProfiloViewModel
{
if (string.IsNullOrEmpty(Nome)) throw new ValidationException("Il nome inserito non è valido");
if (string.IsNullOrEmpty(Cognome)) throw new ValidationException("Il cognome inserito non è valido");
+ if (!Email.Contains("@")) throw new ValidationException("L'indirizzo mail inserito non è valido");
if (!string.IsNullOrEmpty(Password) && string.IsNullOrEmpty(ConfirmPassword)) throw new Exception("E' necessario inserire la password di conferma");
if (!string.IsNullOrEmpty(Password) && !string.IsNullOrEmpty(ConfirmPassword) && Password != ConfirmPassword)
throw new ValidationException("Le due password non corrispondono");
diff --git a/StandManager/Model/UtenteViewModel.cs b/StandManager/Model/UtenteViewModel.cs
index 81043cc..e63f495 100644
--- a/StandManager/Model/UtenteViewModel.cs
+++ b/StandManager/Model/UtenteViewModel.cs
@@ -7,7 +7,7 @@ public class UtenteViewModel
{
public Guid Id { get; set; }
public string Username { get; set; }
- [Required]
+ [Required(ErrorMessage = "L'email è obbligatoria")]
[EmailAddress(ErrorMessage = "Email non valida")]
public string Email { get; set; }
public string Password { get; set; }