ModelValidator.Validate Method
Validates a specified object.
Namespace: System.Web.Http.Validation
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public MustOverride Function Validate ( _
metadata As ModelMetadata, _
container As Object _
) As IEnumerable(Of ModelValidationResult)
'Usage
Dim instance As ModelValidator
Dim metadata As ModelMetadata
Dim container As Object
Dim returnValue As IEnumerable(Of ModelValidationResult)
returnValue = instance.Validate(metadata, _
container)
public abstract IEnumerable<ModelValidationResult> Validate(
ModelMetadata metadata,
Object container
)
public:
virtual IEnumerable<ModelValidationResult^>^ Validate(
ModelMetadata^ metadata,
Object^ container
) abstract
abstract Validate :
metadata:ModelMetadata *
container:Object -> IEnumerable<ModelValidationResult>
public abstract function Validate(
metadata : ModelMetadata,
container : Object
) : IEnumerable<ModelValidationResult>
Parameters
metadata
Type: System.Web.Http.Metadata.ModelMetadataThe metadata.
container
Type: System.ObjectThe container.
Return Value
Type: System.Collections.Generic.IEnumerable<ModelValidationResult>
A list of validation results.