DataAnnotationsModelValidator Constructor
Initializes a new instance of the DataAnnotationsModelValidator class.
Namespace: System.Web.Http.Validation.Validators
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Sub New ( _
validatorProviders As IEnumerable(Of ModelValidatorProvider), _
attribute As ValidationAttribute _
)
'Usage
Dim validatorProviders As IEnumerable(Of ModelValidatorProvider)
Dim attribute As ValidationAttribute
Dim instance As New DataAnnotationsModelValidator(validatorProviders, _
attribute)
public DataAnnotationsModelValidator(
IEnumerable<ModelValidatorProvider> validatorProviders,
ValidationAttribute attribute
)
public:
DataAnnotationsModelValidator(
IEnumerable<ModelValidatorProvider^>^ validatorProviders,
ValidationAttribute^ attribute
)
new :
validatorProviders:IEnumerable<ModelValidatorProvider> *
attribute:ValidationAttribute -> DataAnnotationsModelValidator
public function DataAnnotationsModelValidator(
validatorProviders : IEnumerable<ModelValidatorProvider>,
attribute : ValidationAttribute
)
Parameters
validatorProviders
Type: System.Collections.Generic.IEnumerable<ModelValidatorProvider>The validator providers.
attribute
Type: System.ComponentModel.DataAnnotations.ValidationAttributeThe validation attribute for the model.