Compartir a través de


ValidationVisitor.Validate Método

Definición

Sobrecargas

Validate(ModelMetadata, String, Object)

Valida un objeto .

Validate(ModelMetadata, String, Object, Boolean)

Valida un objeto .

Validate(ModelMetadata, String, Object, Boolean, Object)

Valida un objeto .

Validate(ModelMetadata, String, Object)

Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs

Valida un objeto .

public:
 bool Validate(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model);
public bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model);
member this.Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
Public Function Validate (metadata As ModelMetadata, key As String, model As Object) As Boolean

Parámetros

metadata
ModelMetadata

asociado ModelMetadata al modelo.

key
String

Clave de prefijo del modelo.

model
Object

Objeto del modelo.

Devoluciones

true es si el objeto es válido; de lo contrario false, es .

Se aplica a

Validate(ModelMetadata, String, Object, Boolean)

Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs
Source:
ValidationVisitor.cs

Valida un objeto .

public:
 virtual bool Validate(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model, bool alwaysValidateAtTopLevel);
public virtual bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel);
public virtual bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? metadata, string? key, object? model, bool alwaysValidateAtTopLevel);
abstract member Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj * bool -> bool
override this.Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj * bool -> bool
Public Overridable Function Validate (metadata As ModelMetadata, key As String, model As Object, alwaysValidateAtTopLevel As Boolean) As Boolean

Parámetros

metadata
ModelMetadata

asociado ModelMetadata al modelo.

key
String

Clave de prefijo del modelo.

model
Object

Objeto del modelo.

alwaysValidateAtTopLevel
Boolean

Si truees , aplica reglas de validación incluso si el valor de nivel superior es null.

Devoluciones

true es si el objeto es válido; de lo contrario false, es .

Se aplica a

Validate(ModelMetadata, String, Object, Boolean, Object)

Source:
ValidationVisitor.cs

Valida un objeto .

public:
 virtual bool Validate(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model, bool alwaysValidateAtTopLevel, System::Object ^ container);
public virtual bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel, object container);
public virtual bool Validate (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata? metadata, string? key, object? model, bool alwaysValidateAtTopLevel, object? container);
abstract member Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj * bool * obj -> bool
override this.Validate : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj * bool * obj -> bool
Public Overridable Function Validate (metadata As ModelMetadata, key As String, model As Object, alwaysValidateAtTopLevel As Boolean, container As Object) As Boolean

Parámetros

metadata
ModelMetadata

asociado ModelMetadata al modelo.

key
String

Clave de prefijo del modelo.

model
Object

Objeto del modelo.

alwaysValidateAtTopLevel
Boolean

Si truees , aplica reglas de validación incluso si el valor de nivel superior es null.

container
Object

Contenedor del modelo.

Devoluciones

true es si el objeto es válido; de lo contrario false, es .

Se aplica a