Bagikan melalui


ControllerBase.ValidationProblem Metode

Definisi

Overload

ValidationProblem(ValidationProblemDetails)

Membuat BadRequestObjectResult yang menghasilkan respons Status400BadRequest.

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

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan nilai ValidationProblemDetails.

ValidationProblem()

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan kesalahan validasi dari ModelState.

ValidationProblem(ModelStateDictionary)

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan kesalahan validasi dari modelStateDictionary.

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

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan nilai ValidationProblemDetails.

ValidationProblem(ValidationProblemDetails)

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat BadRequestObjectResult yang menghasilkan respons 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]
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
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
[<Microsoft.AspNetCore.Mvc.NonAction>]
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)>]
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

Parameter

Mengembalikan

BadRequestObjectResult yang dibuat untuk respons.

Atribut

Berlaku untuk

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

Sumber:
ControllerBase.cs

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan nilai 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]
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
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]
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem (string? detail, string? instance, int? statusCode, string? title, string? type, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary? modelStateDictionary);
[<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
[<Microsoft.AspNetCore.Mvc.NonAction>]
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)>]
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
Public Overridable Function ValidationProblem (detail As String, instance As String, statusCode As Nullable(Of Integer), title As String, type As String, modelStateDictionary As ModelStateDictionary) As ActionResult

Parameter

detail
String

Nilai untuk Detail.

instance
String

Nilai untuk Instance.

statusCode
Nullable<Int32>

Kode status.

title
String

Nilai untuk Title.

type
String

Nilai untuk Type.

modelStateDictionary
ModelStateDictionary

ModelStateDictionary. Saat null menggunakan ModelState.

Mengembalikan

ActionResult yang dibuat untuk respons.

Atribut

Berlaku untuk

ValidationProblem()

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan kesalahan validasi dari ModelState.

public:
 virtual Microsoft::AspNetCore::Mvc::ActionResult ^ ValidationProblem();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem ();
[Microsoft.AspNetCore.Mvc.NonAction]
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
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
[<Microsoft.AspNetCore.Mvc.NonAction>]
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)>]
abstract member ValidationProblem : unit -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : unit -> Microsoft.AspNetCore.Mvc.ActionResult
Public Overridable Function ValidationProblem () As ActionResult

Mengembalikan

ActionResult yang dibuat untuk respons.

Atribut

Berlaku untuk

ValidationProblem(ModelStateDictionary)

Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs
Sumber:
ControllerBase.cs

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan kesalahan validasi dari 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]
[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
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
[<Microsoft.AspNetCore.Mvc.NonAction>]
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)>]
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

Parameter

Mengembalikan

BadRequestObjectResult yang dibuat untuk respons.

Atribut

Berlaku untuk

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

Membuat ActionResult yang menghasilkan respons Status400BadRequest dengan nilai ValidationProblemDetails.

[Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)]
[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, System.Collections.Generic.IDictionary<string,object?>? extensions = default);
[<Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCode(400)>]
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member ValidationProblem : string * string * Nullable<int> * string * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * System.Collections.Generic.IDictionary<string, obj> -> Microsoft.AspNetCore.Mvc.ActionResult
override this.ValidationProblem : string * string * Nullable<int> * string * string * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * System.Collections.Generic.IDictionary<string, obj> -> 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, Optional extensions As IDictionary(Of String, Object) = Nothing) As ActionResult

Parameter

detail
String

Nilai untuk Detail.

instance
String

Nilai untuk Instance.

statusCode
Nullable<Int32>

Kode status.

title
String

Nilai untuk Title.

type
String

Nilai untuk Type.

modelStateDictionary
ModelStateDictionary

ModelStateDictionary. Saat null menggunakan ModelState.

extensions
IDictionary<String,Object>

Nilai untuk Extensions.

Mengembalikan

ActionResult yang dibuat untuk respons.

Atribut

Berlaku untuk