Export (0) Print
Expand All

RegularExpressionAttribute.IsValid Method (Object)

Checks whether the value entered by the user matches the regular expression pattern.

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 data field value to validate.

Return Value

Type: System.Boolean
true if validation is successful; otherwise, false.

ExceptionCondition
ValidationException

The data field value did not match the regular expression pattern.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft