Aracılığıyla paylaş


ObjectModelValidator.Validate Yöntem

Tanım

Aşırı Yüklemeler

Validate(ActionContext, ValidationStateDictionary, String, Object)

Sağlanan nesneyi doğrular.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata)

Sağlanan nesne modelini doğrular. ise modelnull ve metadata'ler IsRequired ise true, olmayan bir veya daha fazla model durumu hatası Validate(ActionContext, ValidationStateDictionary, String, Object) ekler.

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object)

Sağlanan nesne modelini doğrular. ise modelnull ve metadata'ler IsRequired ise true, olmayan bir veya daha fazla model durumu hatası Validate(ActionContext, ValidationStateDictionary, String, Object) ekler.

Validate(ActionContext, ValidationStateDictionary, String, Object)

Kaynak:
ObjectModelValidator.cs
Kaynak:
ObjectModelValidator.cs
Kaynak:
ObjectModelValidator.cs

Sağlanan nesneyi doğrular.

public:
 virtual void Validate(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ValidationStateDictionary ^ validationState, System::String ^ prefix, System::Object ^ model);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary? validationState, string? prefix, object? model);
abstract member Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj -> unit
override this.Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj -> unit
Public Overridable Sub Validate (actionContext As ActionContext, validationState As ValidationStateDictionary, prefix As String, model As Object)

Parametreler

actionContext
ActionContext

ActionContext Geçerli istekle ilişkili.

validationState
ValidationStateDictionary

ValidationStateDictionary. Null olabilir.

prefix
String

Model ön eki. Model nesnesini içindeki validationStategirişlere eşlemek için kullanılır.

model
Object

Model nesnesi.

Uygulamalar

Şunlara uygulanır

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata)

Kaynak:
ObjectModelValidator.cs
Kaynak:
ObjectModelValidator.cs
Kaynak:
ObjectModelValidator.cs

Sağlanan nesne modelini doğrular. ise modelnull ve metadata'ler IsRequired ise true, olmayan bir veya daha fazla model durumu hatası Validate(ActionContext, ValidationStateDictionary, String, Object) ekler.

public:
 virtual void Validate(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ValidationStateDictionary ^ validationState, System::String ^ prefix, System::Object ^ model, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary? validationState, string? prefix, object? model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata);
abstract member Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata -> unit
override this.Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata -> unit
Public Overridable Sub Validate (actionContext As ActionContext, validationState As ValidationStateDictionary, prefix As String, model As Object, metadata As ModelMetadata)

Parametreler

actionContext
ActionContext

ActionContext.

prefix
String

Model ön ek anahtarı.

model
Object

Model nesnesi.

Şunlara uygulanır

Validate(ActionContext, ValidationStateDictionary, String, Object, ModelMetadata, Object)

Kaynak:
ObjectModelValidator.cs

Sağlanan nesne modelini doğrular. ise modelnull ve metadata'ler IsRequired ise true, olmayan bir veya daha fazla model durumu hatası Validate(ActionContext, ValidationStateDictionary, String, Object) ekler.

public:
 virtual void Validate(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::ValidationStateDictionary ^ validationState, System::String ^ prefix, System::Object ^ model, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::Object ^ container);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object container);
public virtual void Validate (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary? validationState, string? prefix, object? model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object? container);
abstract member Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj -> unit
override this.Validate : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary * string * obj * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj -> unit
Public Overridable Sub Validate (actionContext As ActionContext, validationState As ValidationStateDictionary, prefix As String, model As Object, metadata As ModelMetadata, container As Object)

Parametreler

actionContext
ActionContext

ActionContext.

prefix
String

Model ön ek anahtarı.

model
Object

Model nesnesi.

container
Object

Model kapsayıcısı

Şunlara uygulanır