Perhaps my googlin' skills are not so great this morning, but I can't seem to find how to set up different password requirements (rather than min/max length) with a new asp.net mvc5 project using individual user accounts.
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
I don't know what password requirements I want to do just yet, but likely a combination of min length and requiring one lowercase, on capital letter, and a number.
Any idea how I can accomplish this (via model attributes preferably)?
question from:
https://stackoverflow.com/questions/20953371/asp-net-identity-require-strong-passwords 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…