Επεξεργασία

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


MaxLengthAttribute.IsValid(Object) Method

Definition

Determines whether a specified object is valid.

public:
 override bool IsValid(System::Object ^ value);
public override bool IsValid (object value);
public override bool IsValid (object? value);
override this.IsValid : obj -> bool
Public Overrides Function IsValid (value As Object) As Boolean

Parameters

value
Object

The object to validate.

Returns

true if the value is null, or if the value is less than or equal to the specified maximum length; otherwise, false.

Exceptions

Length is zero or less than negative one.

Remarks

This method returns true if the value parameter is null.

Applies to