View Source
Class ValidationErrorResult
Custom result to return a validation error message with required headers
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ActionResult
Microsoft.AspNetCore.Mvc.ObjectResult
Assembly: Umbraco.Web.Common.dll
Syntax
public class ValidationErrorResult : ObjectResult, IStatusCodeActionResult, IActionResult
Constructors
View Source
ValidationErrorResult(ModelStateDictionary)
Declaration
public ValidationErrorResult(ModelStateDictionary modelState)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary |
modelState |
|
View Source
ValidationErrorResult(Object)
Declaration
public ValidationErrorResult(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
View Source
ValidationErrorResult(Object, Int32)
Declaration
public ValidationErrorResult(object value, int statusCode)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
System.Int32 |
statusCode |
|
View Source
ValidationErrorResult(String)
Declaration
public ValidationErrorResult(string errorMessage)
Parameters
Type |
Name |
Description |
System.String |
errorMessage |
|
View Source
ValidationErrorResult(String, Int32)
Declaration
public ValidationErrorResult(string errorMessage, int statusCode)
Parameters
Type |
Name |
Description |
System.String |
errorMessage |
|
System.Int32 |
statusCode |
|
Methods
View Source
CreateNotificationValidationErrorResult(String)
Typically this should not be used and just use the ValidationProblem method on the base controller class.
Declaration
public static ValidationErrorResult CreateNotificationValidationErrorResult(string errorMessage)
Parameters
Type |
Name |
Description |
System.String |
errorMessage |
|
Returns
View Source
OnFormatting(ActionContext)
Declaration
public override void OnFormatting(ActionContext context)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.ActionContext |
context |
|