login form validation

This commit is contained in:
Shaun Walker
2021-04-02 16:14:02 -04:00
parent 6606ebb58a
commit 61b73060e5
4 changed files with 102 additions and 64 deletions

View File

@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Threading.Tasks;
@ -232,5 +233,19 @@ namespace Oqtane.UI
return Task.CompletedTask;
}
}
public ValueTask<bool> FormValid(ElementReference form)
{
try
{
return _jsRuntime.InvokeAsync<bool>(
"Oqtane.Interop.formValid",
form);
}
catch
{
return new ValueTask<bool>(Task.FromResult(false));
}
}
}
}