IValidatableObject 接口

定义

提供用于验证对象的方法。Provides a way for an object to be validated.

public interface class IValidatableObject
public interface IValidatableObject
type IValidatableObject = interface
Public Interface IValidatableObject

注解

可以检查实现此接口的类型的实例,以确定它们是否有效。Instances of types that implement this interface can be checked to determine if they are valid.

方法

Validate(ValidationContext)

确定指定的对象是否有效。Determines whether the specified object is valid.

适用于