I have Razor Pages form like this:
<form id="account" method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-floating mb-3">
<input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true" />
<label asp-for="Input.Email" class="form-label"></label>
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>
...
in the output i get the following render:
<form id="account" method="post">
<div class="form-floating mb-3">
<input class="form-control" autocomplete="username" aria-required="true" type="email" data-val="true"
data-val-email="The Email field is not a valid e-mail address." data-val-required="The Email field is required."
id="Input_Email" name="Input.Email" value="">
<label class="form-label" for="Input_Email">Email</label>
<span class="text-danger field-validation-valid" data-valmsg-for="Input.Email" data-valmsg-replace="true"></span>
</div>
...
But Bootstrap v5 uses the :invalid and :valid styles applied to form controls.
At the same time, data-val- attributes are not taken into account in any way.
Is it possible to seamlessly connect the Bootstrap 5 validation functionality on the client while retaining all the power of customizing the Razor Pages validation model?