yavsc/Yavsc.Server/ViewModels/Account/RegisterViewModel.cs

32 lines
841 B
C#
Raw Normal View History

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
{
[StringLength(102)]
2018-08-01 10:55:52 +02:00
[YaRegularExpression(Constants.UserNameRegExp)]
2018-03-26 19:27:29 +02:00
public string UserName { get; set; }
[YaRequired()]
// [EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }
[StringLength(100, MinimumLength = 6)]
[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
}
}