Saving
This commit is contained in:
1 parent
9719a0c0fd
commit
1e66851113
146 files changed
+738
-382
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using PrivaPub.ClientModels.Resources;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PrivaPub.ClientModels
|
||||
{
|
||||
[AtLeastOneProperty(nameof(UserName), nameof(Email),
|
||||
ErrorMessageResourceName = "AtLeastOneProperty",
|
||||
ErrorMessageResourceType = typeof(ErrorsResource))]
|
||||
public class PasswordRecoveryForm
|
||||
{
|
||||
[Display(Name = "UserName", ResourceType = typeof(FieldsNameResource)),
|
||||
MinLength(3, ErrorMessageResourceName = "MinLength", ErrorMessageResourceType = typeof(ErrorsResource))]
|
||||
public string UserName { get; set; }
|
||||
|
||||
[Display(Name = "Email", ResourceType = typeof(FieldsNameResource)),
|
||||
DataType(DataType.EmailAddress),
|
||||
MinLength(3, ErrorMessageResourceName = "MinLength", ErrorMessageResourceType = typeof(ErrorsResource)),
|
||||
EmailAddress(ErrorMessageResourceName = "InvalidEmail", ErrorMessageResourceType = typeof(ErrorsResource))]
|
||||
public string Email { get; set; }
|
||||
|
||||
public bool IsUsernameDisabled => !string.IsNullOrEmpty(Email);
|
||||
public bool IsEmailDisabled => !string.IsNullOrEmpty(UserName);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user