2018-03-26 19:27:29 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Yavsc.Attributes.Validation;
|
2019-10-08 23:41:19 +01:00
|
|
|
using Yavsc.Abstract;
|
|
|
|
|
using Yavsc;
|
2018-03-26 19:27:29 +02:00
|
|
|
|
|
|
|
|
namespace Yavsc.ViewModels.Account
|
|
|
|
|
{
|
2019-10-08 23:41:19 +01:00
|
|
|
public class RegisterModel
|
2018-03-26 19:27:29 +02:00
|
|
|
{
|
|
|
|
|
|
2026-05-30 19:34:22 +01:00
|
|
|
[StringLength(YavscConstants.MaxUserNameLength)]
|
|
|
|
|
[RegularExpression(YavscConstants.UserNameRegExp)]
|
2024-11-23 14:23:47 +00:00
|
|
|
[DataType(DataType.Text)]
|
2026-02-22 23:39:56 +00:00
|
|
|
[Display(Name = "UserName", Description = "User name")]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string UserName { get; set; }
|
|
|
|
|
|
2024-11-23 14:23:47 +00:00
|
|
|
[Required()]
|
|
|
|
|
[StringLength( maximumLength:102, MinimumLength = 5)]
|
2018-03-26 19:27:29 +02:00
|
|
|
// [EmailAddress]
|
2024-11-23 14:23:47 +00:00
|
|
|
[Display(Name = "Email", Description = "E-Mail")]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
2024-11-23 14:23:47 +00:00
|
|
|
[StringLength(maximumLength:100, MinimumLength = 6,
|
|
|
|
|
ErrorMessage = "Le mot de passe doit contenir au moins 8 caratères")]
|
2018-03-26 19:27:29 +02:00
|
|
|
[DataType(DataType.Password)]
|
2024-11-23 14:23:47 +00:00
|
|
|
[Display(Name = "Password")]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string Password { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Password)]
|
2018-08-01 10:55:52 +02:00
|
|
|
[Compare("Password")]
|
2024-11-23 14:23:47 +00:00
|
|
|
[Display(Name = "ConfirmPassword", Description ="Password Confirmation")]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string ConfirmPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|