chore: use min_passwd_length with attribute
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f7ab994ddb
commit
90553d9ae9
|
@ -5,9 +5,12 @@ namespace pwt_0x01_ng.Models
|
|||
{
|
||||
public class RegisterViewModel
|
||||
{
|
||||
private string min_passwd_length_err_msg = "minimum password length is "+ config.min_passwd_length;
|
||||
|
||||
[Required]
|
||||
public string username {get; set;}
|
||||
[Required]
|
||||
[RegularExpression(@"^.{{min_passwd_length},}$")]
|
||||
public string password {get; set;}
|
||||
[Required]
|
||||
[Compare(nameof(password), ErrorMessage = "Passwords don't match.")]
|
||||
|
|
Reference in New Issue