IsValid Method
Collapse the table of content
Expand the table of content

ValidationAttribute.IsValid Method

Determines whether the specified value of the object is valid.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public abstract bool IsValid(
	Object value
)

Parameters

value
Type: System.Object

The value of the specified validation object on which the ValidationAttribute is declared.

Return Value

Type: System.Boolean
true if the specified value is valid; otherwise, false.

If you create a derived class from the ValidationAttribute class, you must implement the validation logic in this method.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1

Community Additions

ADD
Show:
© 2016 Microsoft