Created
September 12, 2018 08:37
-
-
Save angelyordanov/000307989c76cbc3578a3c2445ce66ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var modelState = actionContextAccessor.ActionContext.ModelState; | |
modelState.AddModelError( | |
nameof(data.UserVersion), | |
$"The {nameof(data.UserVersion)} field is required."); | |
return new BadRequestObjectResult(modelState); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment