VirtualTask/Models/Registrazione.cs

60 lines
2.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.Xml.Linq;
namespace VirtualTask.Models
{
public class Registrazione
{
public int id { get; set; }
[Display(Name = "Nome"), Required(ErrorMessage = "Nome obbligatorio")]
[StringLength(50)]
public string? nome { get; set; }
[Display(Name = "Cognome"), Required(ErrorMessage = "Cognome obbligatorio")]
[StringLength(50)]
public string? cognome { get; set; }
[Display(Name = "Telefono"), Required(ErrorMessage = "Telefono obbligatorio")]
[StringLength(50)]
public string? telefono { get; set;}
[Display(Name = "Cellulare"), Required(ErrorMessage = "Cellulare obbligatorio")]
[StringLength(50)]
public string? cellulare { get; set;}
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
[StringLength(100)]
[Display(Name = "Email"), Required(ErrorMessage = "Email obbligatorio")]
public string? email { get; set;}
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Conferma Email non valido")]
[Display(Name = "Conferma Email"), Required(ErrorMessage = "Conferma Email obbligatorio")]
public string? emailConf { get; set;}
[Display(Name = "Azienda"), Required(ErrorMessage = "Azienda obbligatorio")]
[StringLength(5)]
public string? azienda { get; set; }
[Display(Name = "Username"), Required(ErrorMessage = "Username obbligatorio")]
[StringLength(20)]
public string? username { get; set; }
[Display(Name = "Password"), Required(ErrorMessage = "Password obbligatorio")]
[StringLength(20)]
public string? passwd { get; set;}
[StringLength(50)]
public string? citta { get; set;}
[StringLength(2)]
public string? provincia { get; set;}
[StringLength(2)]
public string? nazione { get; set;}
[StringLength(1)]
public string? attivato { get; set;}
}
}