mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
CSV Import command created
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace ModernKeePass.Application.Database.Commands.CreateDatabase
|
||||
{
|
||||
public class CreateDatabaseCommandValidator : AbstractValidator<CreateDatabaseCommand>
|
||||
{
|
||||
public CreateDatabaseCommandValidator()
|
||||
{
|
||||
RuleFor(v => v.FilePath)
|
||||
.NotNull()
|
||||
.NotEmpty();
|
||||
RuleFor(v => v.Password)
|
||||
.NotNull()
|
||||
.NotEmpty()
|
||||
.When(v => string.IsNullOrEmpty(v.KeyFilePath));
|
||||
RuleFor(v => v.KeyFilePath)
|
||||
.NotNull()
|
||||
.NotEmpty()
|
||||
.When(v => string.IsNullOrEmpty(v.Password));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user