ControllerBase.ValidationProblem Метод

Определение

Перегрузки

ValidationProblem(ModelStateDictionary)

Создает ActionResult , создающий Status400BadRequest ответ с ошибками проверки из modelStateDictionary .

ValidationProblem(ValidationProblemDetails)

Создает объект BadRequestObjectResult , создающий Status400BadRequest ответ.

ValidationProblem()

Создает ActionResult , создающий Status400BadRequest ответ с ошибками проверки из ModelState .

ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

Создает объект ActionResult , создающий Status400BadRequest ответ со ValidationProblemDetails значением.

ValidationProblem(ModelStateDictionary)

Создает ActionResult , создающий Status400BadRequest ответ с ошибками проверки из modelStateDictionary .

public:
 virtual Microsoft::AspNetCore::Mvc::ActionResult ^ ValidationProblem(Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelStateDictionary);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member ValidationProblem : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.ActionResult
Public Overridable Function ValidationProblem (modelStateDictionary As ModelStateDictionary) As ActionResult

Параметры

Возвращаемое значение

ActionResult

Объект, созданный BadRequestObjectResult для ответа.

Атрибуты

Применяется к

ValidationProblem(ValidationProblemDetails)

Создает объект BadRequestObjectResult , создающий Status400BadRequest ответ.

public:
 virtual Microsoft::AspNetCore::Mvc::ActionResult ^ ValidationProblem(Microsoft::AspNetCore::Mvc::ValidationProblemDetails ^ descriptor);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem (Microsoft.AspNetCore.Mvc.ValidationProblemDetails descriptor);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member ValidationProblem : Microsoft.AspNetCore.Mvc.ValidationProblemDetails -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : Microsoft.AspNetCore.Mvc.ValidationProblemDetails -> Microsoft.AspNetCore.Mvc.ActionResult
Public Overridable Function ValidationProblem (descriptor As ValidationProblemDetails) As ActionResult

Параметры

Возвращаемое значение

ActionResult

Объект, созданный BadRequestObjectResult для ответа.

Атрибуты

Применяется к

ValidationProblem()

Создает ActionResult , создающий Status400BadRequest ответ с ошибками проверки из ModelState .

public:
 virtual Microsoft::AspNetCore::Mvc::ActionResult ^ ValidationProblem();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member ValidationProblem : unit -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : unit -> Microsoft.AspNetCore.Mvc.ActionResult
Public Overridable Function ValidationProblem () As ActionResult

Возвращаемое значение

ActionResult

Объект, созданный ActionResult для ответа.

Атрибуты

Применяется к

ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

Создает объект ActionResult , создающий Status400BadRequest ответ со ValidationProblemDetails значением.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem (string detail = default, string instance = default, int? statusCode = default, string title = default, string type = default, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary = default);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem (string? detail = default, string? instance = default, int? statusCode = default, string? title = default, string? type = default, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary = default);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member ValidationProblem : string * string * Nullable<int> * string * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : string * string * Nullable<int> * string * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.ActionResult
Public Overridable Function ValidationProblem (Optional detail As String = Nothing, Optional instance As String = Nothing, Optional statusCode As Nullable(Of Integer) = Nothing, Optional title As String = Nothing, Optional type As String = Nothing, Optional modelStateDictionary As ModelStateDictionary = Nothing) As ActionResult

Параметры

detail
String

Значение для Detail .

instance
String

Значение для Instance .

statusCode
Nullable<Int32>

Код состояния.

title
String

Значение для Title .

type
String

Значение для Type .

modelStateDictionary
ModelStateDictionary

ModelStateDictionary. При null использовании ModelState .

Возвращаемое значение

ActionResult

Объект, созданный ActionResult для ответа.

Атрибуты

Применяется к