Freigeben über


ModelClientValidationRegexRule Constructor

Initializes a new instance of the ModelClientValidationRegexRule class.

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

Syntax

'Declaration
Public Sub New ( _
    errorMessage As String, _
    pattern As String _
)
public ModelClientValidationRegexRule(
    string errorMessage,
    string pattern
)
public:
ModelClientValidationRegexRule(
    String^ errorMessage, 
    String^ pattern
)

Parameters

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

Remarks

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

See Also

Reference

ModelClientValidationRegexRule Class

System.Web.Mvc Namespace