Partager via


DataAnnotationsModelValidatorProvider.GetValidators Méthode

Définition

Obtient une collection de validateurs pour le modèle.

protected:
 override System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes);
protected override System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, System.Collections.Generic.IEnumerable<Attribute> attributes);
override this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * seq<Attribute> -> seq<System.Web.ModelBinding.ModelValidator>
Protected Overrides Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext, attributes As IEnumerable(Of Attribute)) As IEnumerable(Of ModelValidator)

Paramètres

metadata
ModelMetadata

Métadonnées.

context
ModelBindingExecutionContext

Contexte d'exécution.

attributes
IEnumerable<Attribute>

Attributs de validation.

Retours

Collection de validateurs.

S’applique à