zulerf
zulerf
CC#
Created by zulerf on 3/14/2023 in #help
❔ FluentValidation Custom Client Response?
I have a FluentValidation implementation for my .net core API, currently when a validation exception is thrown, I get a 400 error code, was wondering if I can change this to respond with a 422 error code instead. The .WithErrorCode attributes will not work as these are localised, I have read many solutions which are way to convoluted for the scope of this project. Is there a simple way of doing it?
4 replies