Rediger

Del via


RegularExpressionAttribute.IsValid(Object) Method

Definition

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

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

Returns

true if validation is successful; otherwise, false.

Exceptions

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

The current attribute is ill-formed.

Pattern is not a valid regular expression.

Remarks

This override performs the specific regular expression matching of value field.

Applies to