Is it possible to implement custom model validation that would return custom model state (or has anyone implemented such a thing)?
In the current implementation, the validation error item contains only the field name and error message (or code if you want to put it in the error message).
My requirement is to return the error code alongside field name and error message. I would like to use asp.net core pipeline and avoid situation where I'm calling some custom validator in the controller method that returns BadRequest with custom validation error object.
Haven't worked with Razor Pages apps before and I'm having trouble getting a form inside of a partial view to work. Submitting the form is not calling the OnPost method at all. Not sure what I'm doing wrong. Or how it's supposed to be done.
Anyone have a link for creating forms specifically in a partial view?>