I have a Razor Pages application (ASP.NET Core).
Is there a way to write a message to the validation summary from JavaScript? And have it appear formatted (red, etc.)?
I have a Razor Pages application (ASP.NET Core).
Is there a way to write a message to the validation summary from JavaScript? And have it appear formatted (red, etc.)?
Copyright © 2021 Jogjafile Inc.
The validation summary tag helper adds a CSS class to the div where the validation summary is rendered:
validation-summary-errors. You can use that (or any other selector you add to the div) to get a reference to the div in JavaScript: