//----------------------------------------------------------------------- // // Copyright (c) lanedirt. All rights reserved. // Licensed under the MIT license. See LICENSE.md file in the project root for full license information. // //----------------------------------------------------------------------- namespace AliasVault.Shared.Models; using System.ComponentModel.DataAnnotations; using AliasVault.Shared.Models.Validation; /// /// Register model. /// public class RegisterModel { /// /// Gets or sets the username. /// [Required] public string Username { get; set; } = null!; /// /// Gets or sets the password. /// [Required] [MinLength(8, ErrorMessage = "Password must be at least 8 characters long.")] public string Password { get; set; } = null!; /// /// Gets or sets the password confirmation. /// [Required] [Compare("Password", ErrorMessage = "Passwords do not match.")] public string PasswordConfirm { get; set; } = null!; /// /// Gets or sets a value indicating whether the terms and conditions are accepted or not. /// [MustBeTrue(ErrorMessage = "You must accept the terms and conditions.")] public bool AcceptTerms { get; set; } = false; }