Export (0) Print
Expand All

ModelClientValidationRegexRule Constructor

Initializes a new instance of the ModelClientValidationRegexRule class.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public ModelClientValidationRegexRule(
	string errorMessage,
	string pattern
)

Parameters

errorMessage
Type: System.String
The error message to display when the regular expression validation fails.
pattern
Type: System.String
The regular expression.

The constructor sets the error message, the regular expression, and the validation type. The validation type is set to the string "regularExpression".

Show:
© 2014 Microsoft