I'm trying to customize the way the client-side validation is displayed on my form.
I don't want to use the asp-validation-for
tags so they don't display with the control. I'd rather show these in the ValidationSummary
control with the other errors or some other centralized place.
Is there a way to show the client-side model.field errors anywhere other than using a asp-validation-for
tag?
CodePudding user response:
Use validation summary tag helper with attribute asp-validation-summary="All"
<form>
<div asp-validation-summary="All"></div>
</form>