A Sandcastle Documented Class Library

# StringValidationRule Constructor (Int32, Regex, Boolean, Func String )

Initializes a new instance of the StringValidationRule class.

Namespace: Dundas.BI.Configuration
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public StringValidationRule(
    	int maxLength,
    	Regex matchingPattern,
    	bool isEmptyStringValid,
    	Func<string> patternDescriptionGenerator
    )

    Public Sub New (
    	maxLength As Integer,
    	matchingPattern As Regex,
    	isEmptyStringValid As Boolean,
    	patternDescriptionGenerator As Func(Of String)
    )

    public:
    StringValidationRule(
    	int maxLength,
    	Regex^ matchingPattern,
    	bool isEmptyStringValid,
    	Func<String^>^ patternDescriptionGenerator
    )

    new :
            maxLength : int *
            matchingPattern : Regex *
            isEmptyStringValid : bool *
            patternDescriptionGenerator : Func<string> -> StringValidationRule

#### Parameters

maxLength
  Type: System
  Int32
  The maximum allowed string length.
matchingPattern
  Type: System.Text.RegularExpressions
  Regex
  The matching pattern.
isEmptyStringValid
  Type: System
  Boolean
  A value indicated whether empty strings are always valid.
patternDescriptionGenerator
  Type: System
  Func
  String
  A delegate which returns a localized description of the validation pattern in friendly language.

Exceptions

Exception | Condition
--- | ---
ArgumentOutOfRangeException | maxLength is less than or equal to zero.

See Also

#### Reference

StringValidationRule Class
StringValidationRule Overload
Dundas.BI.Configuration Namespace