2018-03-26 19:27:29 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Yavsc.Attributes.Validation;
|
|
|
|
|
|
|
|
|
|
namespace Yavsc.ViewModels.Account
|
|
|
|
|
{
|
2018-08-01 10:55:52 +02:00
|
|
|
using Yavsc;
|
2018-03-26 19:27:29 +02:00
|
|
|
public class RegisterViewModel
|
|
|
|
|
{
|
|
|
|
|
|
2019-06-21 09:20:13 +01:00
|
|
|
[YaStringLength(2,Constants.MaxUserNameLength)]
|
2018-08-01 10:55:52 +02:00
|
|
|
[YaRegularExpression(Constants.UserNameRegExp)]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string UserName { get; set; }
|
|
|
|
|
|
2019-06-16 01:10:52 +01:00
|
|
|
[Required()]
|
2019-06-21 09:20:13 +01:00
|
|
|
[YaStringLength(2,102)]
|
2018-03-26 19:27:29 +02:00
|
|
|
// [EmailAddress]
|
|
|
|
|
[Display(Name = "Email")]
|
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
2019-06-21 09:20:13 +01:00
|
|
|
[YaStringLength(6,100)]
|
2018-03-26 19:27:29 +02:00
|
|
|
[DataType(DataType.Password)]
|
|
|
|
|
|
|
|
|
|
// ErrorMessage = "Les mots de passe doivent contenir au moins un caractère spécial, qui ne soit ni une lettre ni un chiffre.")]
|
|
|
|
|
|
|
|
|
|
public string Password { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Password)]
|
2018-08-01 10:55:52 +02:00
|
|
|
[Compare("Password")]
|
2018-03-26 19:27:29 +02:00
|
|
|
public string ConfirmPassword { get; set; }
|
|
|
|
|
|
2018-08-01 10:55:52 +02:00
|
|
|
|
2018-03-26 19:27:29 +02:00
|
|
|
}
|
|
|
|
|
}
|