This documentation is archived and is not being maintained.

StringLengthAttribute.IsValid Method

Determines whether a specified object is valid.

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

public override bool IsValid(
	Object value
)

Parameters

value
Type: System.Object

The object to validate.

Return Value

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

This method determines whether an object is valid. If the value of the object is null, the method automatically validates object.

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
Show: