---
title: Support 12-64 Character Passwords
impact: MEDIUM
impactDescription: enables secure passphrase usage
tags: password, length, passphrase, security, csharp
---

## Support 12-64 Character Passwords

Allow users to use long passphrases.

**Configuration:**

```csharp
services.Configure<IdentityOptions>(options =>
{
    options.Password.RequiredLength = 12;
    options.Password.RequireDigit = true;
    options.Password.RequireLowercase = true;
    options.Password.RequireNonAlphanumeric = true; 
    options.Password.RequireUppercase = true; 
});
```

**Validation:**

```csharp
public class RegisterModel
{
    [StringLength(100, MinimumLength = 12)]
    public string Password { get; set; }
}
```

**Tools:** ASP.NET Identity
