Skip to content

Commit b939dcf

Browse files
committed
Use StringLength everywhere (iso MaxLength) for consistency
1 parent 74ef645 commit b939dcf

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Authorization/Accounts/Dto/IsTenantAvailableInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace AbpCompanyName.AbpProjectName.Authorization.Accounts.Dto
66
public class IsTenantAvailableInput
77
{
88
[Required]
9-
[MaxLength(AbpTenantBase.MaxTenancyNameLength)]
9+
[StringLength(AbpTenantBase.MaxTenancyNameLength)]
1010
public string TenancyName { get; set; }
1111
}
1212
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Configuration/Dto/ChangeUiThemeInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace AbpCompanyName.AbpProjectName.Configuration.Dto
55
public class ChangeUiThemeInput
66
{
77
[Required]
8-
[MaxLength(32)]
8+
[StringLength(32)]
99
public string Theme { get; set; }
1010
}
1111
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/MultiTenancy/Dto/CreateTenantDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class CreateTenantDto
2121
[StringLength(AbpUserBase.MaxEmailAddressLength)]
2222
public string AdminEmailAddress { get; set; }
2323

24-
[MaxLength(AbpTenantBase.MaxConnectionStringLength)]
24+
[StringLength(AbpTenantBase.MaxConnectionStringLength)]
2525
public string ConnectionString { get; set; }
2626

2727
public bool IsActive {get; set;}

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Authorization/Roles/Role.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Role(int? tenantId, string name, string displayName)
2424

2525
}
2626

27-
[MaxLength(MaxDescriptionLength)]
27+
[StringLength(MaxDescriptionLength)]
2828
public string Description {get; set;}
2929
}
3030
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/Models/TokenAuth/AuthenticateModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ namespace AbpCompanyName.AbpProjectName.Models.TokenAuth
77
public class AuthenticateModel
88
{
99
[Required]
10-
[MaxLength(AbpUserBase.MaxEmailAddressLength)]
10+
[StringLength(AbpUserBase.MaxEmailAddressLength)]
1111
public string UserNameOrEmailAddress { get; set; }
1212

1313
[Required]
14-
[MaxLength(User.MaxPlainPasswordLength)]
14+
[StringLength(User.MaxPlainPasswordLength)]
1515
public string Password { get; set; }
1616

1717
public bool RememberClient { get; set; }

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/Models/TokenAuth/ExternalAuthenticateModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ namespace AbpCompanyName.AbpProjectName.Models.TokenAuth
66
public class ExternalAuthenticateModel
77
{
88
[Required]
9-
[MaxLength(UserLogin.MaxLoginProviderLength)]
9+
[StringLength(UserLogin.MaxLoginProviderLength)]
1010
public string AuthProvider { get; set; }
1111

1212
[Required]
13-
[MaxLength(UserLogin.MaxProviderKeyLength)]
13+
[StringLength(UserLogin.MaxProviderKeyLength)]
1414
public string ProviderKey { get; set; }
1515

1616
[Required]

0 commit comments

Comments
 (0)