Added Validation logics
This commit is contained in:
@@ -1,25 +1,37 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Toolkit.Foundation;
|
||||
|
||||
namespace Wallet;
|
||||
|
||||
public partial class OpenWalletViewModel(IServiceProvider provider,
|
||||
IServiceFactory factory,
|
||||
IMediator mediator,
|
||||
IPublisher publisher,
|
||||
ISubscriber subscriber,
|
||||
IDisposer disposer,
|
||||
string name) :
|
||||
Observable(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
public partial class OpenWalletViewModel : Observable
|
||||
{
|
||||
private readonly IValidation validation;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? name = name;
|
||||
private string? name;
|
||||
|
||||
[ObservableProperty]
|
||||
private string? password;
|
||||
|
||||
|
||||
[ObservableProperty]
|
||||
private string? repeatedPassword;
|
||||
|
||||
public OpenWalletViewModel(IValidation validation,
|
||||
IServiceProvider provider,
|
||||
IServiceFactory factory,
|
||||
IMediator mediator,
|
||||
IPublisher publisher,
|
||||
ISubscriber subscriber,
|
||||
IDisposer disposer,
|
||||
string name) : base(provider, factory, mediator, publisher, subscriber, disposer)
|
||||
{
|
||||
this.validation = validation;
|
||||
|
||||
Name = name;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task Invoke()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user