I am moving away from mvc to razor pages but can't seem to find my way around with the validation using fluent validator and FormHelper.
Normally with the mvc pattern
[FormValidator]
Public async Task<IActionResult> submitFormAction()
{
// do something
return View();
}
With Razor page
public class AddModel : PageModel
{
public void OnGet()
{
}
[FormValidator] // *'FormValidator' cannot be applied to razor page handler method it may be applied to either Razor page model or applied globally*
public async Task OnPostAsync()
{
}
}