RegexStringValidatorAttribute Constructor (String)
Initializes a new instance of the RegexStringValidatorAttribute object.
Assembly: System.Configuration (in System.Configuration.dll)
The regex parameter contains the regular expression pattern that a string must match before it can be assigned to the decorated configuration-element property.
You use this constructor in the attributed model to ensure that the string value assigned to the related property contains only the allowed characters.
The following example shows how to use theconstructor.
Available since 2.0