Fixed half of warnings having to do with allowing Null string objects. (#791)
This commit is contained in:
@@ -7,18 +7,18 @@ public class ChangePasswordViewModel
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Current password")]
|
||||
public string OldPassword { get; set; }
|
||||
public string? OldPassword { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
public string? NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
public string? ConfirmPassword { get; set; }
|
||||
|
||||
public string StatusMessage { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ public class EnableAuthenticatorViewModel
|
||||
[StringLength(7, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Text)]
|
||||
[Display(Name = "Verification Code")]
|
||||
public string Code { get; set; }
|
||||
public string? Code { get; set; }
|
||||
|
||||
[BindNever]
|
||||
public string SharedKey { get; set; }
|
||||
public string? SharedKey { get; set; }
|
||||
|
||||
[BindNever]
|
||||
public string AuthenticatorUri { get; set; }
|
||||
public string? AuthenticatorUri { get; set; }
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace Microsoft.eShopWeb.Web.ViewModels.Manage;
|
||||
|
||||
public class ExternalLoginsViewModel
|
||||
{
|
||||
public IList<UserLoginInfo> CurrentLogins { get; set; }
|
||||
public IList<AuthenticationScheme> OtherLogins { get; set; }
|
||||
public IList<UserLoginInfo>? CurrentLogins { get; set; }
|
||||
public IList<AuthenticationScheme>? OtherLogins { get; set; }
|
||||
public bool ShowRemoveButton { get; set; }
|
||||
public string StatusMessage { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ public class IndexViewModel
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Phone]
|
||||
[Display(Name = "Phone number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string? StatusMessage { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
public class RemoveLoginViewModel
|
||||
{
|
||||
public string LoginProvider { get; set; }
|
||||
public string ProviderKey { get; set; }
|
||||
public string? LoginProvider { get; set; }
|
||||
public string? ProviderKey { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ public class SetPasswordViewModel
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
public string? NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
public string? ConfirmPassword { get; set; }
|
||||
|
||||
public string StatusMessage { get; set; }
|
||||
public string? StatusMessage { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
public class ShowRecoveryCodesViewModel
|
||||
{
|
||||
public string[] RecoveryCodes { get; set; }
|
||||
public string[]? RecoveryCodes { get; set; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user