mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
More commands/queries
WIP on XAML EntryVm and GroupVm
This commit is contained in:
@@ -8,7 +8,7 @@ namespace ModernKeePass.Application.Entry.Commands.SetFieldValue
|
||||
{
|
||||
public string EntryId { get; set; }
|
||||
public string FieldName { get; set; }
|
||||
public string FieldValue { get; set; }
|
||||
public object FieldValue { get; set; }
|
||||
|
||||
public class SetFieldValueCommandHandler : IRequestHandler<SetFieldValueCommand>
|
||||
{
|
||||
|
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace ModernKeePass.Application.Entry.Commands.SetFieldValue
|
||||
{
|
||||
public class SetFieldValueCommandValidator: AbstractValidator<SetFieldValueCommand>
|
||||
{
|
||||
public SetFieldValueCommandValidator()
|
||||
{
|
||||
RuleFor(v => v.EntryId)
|
||||
.NotNull()
|
||||
.NotEmpty();
|
||||
RuleFor(v => v.FieldName)
|
||||
.NotNull()
|
||||
.NotEmpty();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user