Add nullability to web.common

This commit is contained in:
Nikolaj Geisle
2022-03-29 13:44:21 +02:00
parent 86ae730b1e
commit b52c4e50cf
151 changed files with 731 additions and 675 deletions

View File

@@ -7,13 +7,13 @@ namespace Umbraco.Cms.Web.Common.Models
{
[Required]
[Display(Name = "User name")]
public string Username { get; set; }
public string Username { get; set; } = null!;
[Required]
[DataType(DataType.Password)]
[Display(Name = "Password")]
[StringLength(maximumLength: 256)]
public string Password { get; set; }
public string Password { get; set; } = null!;
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }

View File

@@ -10,6 +10,6 @@ namespace Umbraco.Cms.Web.Common.Models
/// The path to redirect to when update is successful, if not specified then the user will be
/// redirected to the current Umbraco page
/// </summary>
public string RedirectUrl { get; set; }
public string? RedirectUrl { get; set; }
}
}