Share via


ValidationState Enumeration

Identifies whether instances of a class will be enabled for validation.

Namespace:  Microsoft.VisualStudio.Modeling.Validation
Assembly:  Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)

Syntax

'Declaration
Public Enumeration ValidationState
'Usage
Dim instance As ValidationState
public enum ValidationState
public enum class ValidationState
public enum ValidationState

Members

Member name Description
Disabled Indicates that instances of the class to which this value is applied will not be checked by validation methods for this class.
Enabled Indicates that instances of the class to which this value is applied will be enabled for validation.
Inherited Indicates that instances of the class to which this value is applied will be enabled or disabled for validation based on the settings for their parent class.

Remarks

You can apply the ValidationState.Disabled setting to a derived class whose parent is enabled for validation because derived classes have the ValidationState of their parent class by default.

For more information about validation, see How to: Add Validation to a Domain Language.

Examples

The following example shows the ValidationState attribute using the ValidationState enumeration to enable validation to occur on the Person class.

[C#]

[ValidationState(ValidationState.Enabled)]
public partial class Person
{
    //Code goes here...
}

See Also

Reference

Microsoft.VisualStudio.Modeling.Validation Namespace