Problems with validators

Topics: Validation Application Block
Apr 26, 2007 at 6:09 PM
What I'm doing wrong? I get the following error from Visual Studio complier: Name 'Ruleset' is not declared. Same code made with C# works. In this project I have to use VB.NET.

Imports Microsoft.Practices.EnterpriseLibrary.Validation.Validators
Private _name As String
<StringLengthValidator(7, 10, RangeBoundaryType.Inclusive, "Name must be between 3 and 20 characters", Ruleset = "primary")> _
Public Property Name() As String
            Return _name
        End Get
        Set(ByVal value As String)
            _name = value
        End Set
End Property
Apr 26, 2007 at 8:44 PM
The syntax for setting attribute properties in VB is Ruleset := "primary" (colon-equals, not equals).