Resolved If using data annotations does code get called if validation error?

beantownace

Active member
Joined
Feb 15, 2019
Messages
26
Programming Experience
5-10
I have an API that I added data annotations for but I want to write to a log when it enters the controller method. Is there a way I can manually call the data annotation validation if I have the FromBody tied to the transport object that has the data annotations such as Required StringLength etc. but I want to hit the controller first line of code that writes the request object to the log for auditing.
 
Last edited:
Back
Top Bottom