Επεξεργασία

Κοινή χρήση μέσω


ModelValidator Class

Definition

Provides a base class for implementing validation logic.

public ref class ModelValidator abstract
public abstract class ModelValidator
type ModelValidator = class
Public MustInherit Class ModelValidator
Inheritance
ModelValidator
Derived

Constructors

ModelValidator(ModelMetadata, ModelBindingExecutionContext)

Initializes a new instance of the ModelValidator class.

Properties

IsRequired

When implemented in a derived class, gets a value that indicates whether the model is required.

Metadata

When implemented in a derived class, gets the metadata for the model validator.

ModelBindingExecutionContext

When implemented in a derived class, gets the execution context.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetModelValidator(ModelMetadata, ModelBindingExecutionContext)

Returns a composite model validator for the model.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
Validate(Object)

When implemented in a derived class, validates the object.

Applies to