Improve validations

This commit is contained in:
TheXamlGuy
2024-06-22 14:06:54 +01:00
parent 6c6898f448
commit cce13c69ad
+3 -2
View File
@@ -35,8 +35,9 @@ public partial class OpenWalletViewModel : Observable
{
using (await new ActivityLock(this))
{
if (await validation.Validate(() => Password, [new ValidationRule(async () =>
await Mediator.Handle<ActivateEventArgs<Wallet<string>>, bool>(Activate.As(new Wallet<string>(Password))), "The password is incorrect, please try again.")]))
if (await Validation.Validate(() => Password, [new ValidationRule(async () =>
await Mediator.Handle<ActivateEventArgs<Wallet<string>>, bool>(Activate.As(new Wallet<string>(Password))),
"The password is incorrect, please try again.")]))
{
Publisher.Publish(Opened.As<Wallet>());
}