Class UserWithPasswordForm
Represents the form data for creating or updating a user with password information.
public class UserWithPasswordForm : UserForm
- Inheritance
-
UserWithPasswordForm
- Inherited Members
Remarks
This form extends UserForm to include password fields for user registration scenarios. Password complexity requirements include at least one capital letter, one lowercase letter, and one digit. The password fields are not mapped to the database and are only used during the registration process.
Properties
ConfirmPassword
Gets or sets the password confirmation field.
[NotMapped]
[Display(Name = "PasswordConfirm", ResourceType = typeof(Fields))]
[Required(ErrorMessageResourceName = "XRequired", ErrorMessageResourceType = typeof(Messages))]
[Compare("Password", ErrorMessageResourceName = "XMustBeEqualY", ErrorMessageResourceType = typeof(Messages))]
public virtual string? ConfirmPassword { get; set; }
Property Value
Remarks
This field is required and must match the Password field exactly. This property is not persisted to the database.
Password
Gets or sets the user's password.
[NotMapped]
[Display(Name = "Password", ResourceType = typeof(Fields))]
[Required(ErrorMessageResourceName = "XRequired", ErrorMessageResourceType = typeof(Messages))]
[MaxLength(40, ErrorMessageResourceName = "XMustHaveUpToYCharacters", ErrorMessageResourceType = typeof(Messages))]
[MinLength(6, ErrorMessageResourceName = "XMustHaveAtLeastYCharacters", ErrorMessageResourceType = typeof(Messages))]
[PasswordComplexityCapitalLetters(1)]
[PasswordComplexityLowerCaseLetters(1)]
[PasswordComplexityDigits(1)]
public virtual string? Password { get; set; }
Property Value
Remarks
This field is required and must be between 6 and 40 characters. Must contain at least one capital letter, one lowercase letter, and one digit. This property is not persisted to the database.