My RegisterModel has the Password Property as below:
public class RegisterModel
{
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 8)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
}
In Register View, I have this:
<p class="message-info">
Passwords must be at least @Membership.MinRequiredPasswordLength characters long.
</p>
Though, I have changed the MinimumLength of Password to 8 characters in my RegisterModel, still it is showing only 6 on my view page as shown in screenshot below:

How to change Password Length?
Though you have changed it in your
RegisterModel, notice that on yourRegister View, the value is coming fromMembershipclass that is configured according to yourMembershipProviderin yourweb.configfile.So, Check your
web.configfile. It has the following code:Change
minRequiredPasswordLength = "8"here too and it will work for you.OR
If you don’t want to make changes in your
Membership Provider, then you can still do this by writing your own Custom Attribute forMinPasswordLengthas below:Then update your
RegisterModelto use theMinRequiredPasswordLengthDataAnnotation instead.