ValidateEnumValueAttributeAllowNonDefinedValues Property

Gets or sets a value that indicates whether values that do not match one of the enumeration's defined values are allowed.

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public TriState AllowNonDefinedValues { get; set; }

Property Value

TriState
TriStateTrue if values that are not defined by the enumeration are allowed; TriStateFalse if they are not allowed; TriStateAuto to allow non-defined values only when the enumeration has the FlagsAttribute attribute applied. The default value is TriStateAuto.

Remarks

Non-defined values can be provided using the underlying numeric type of the enumeration, or by using comma-separated values. If this property is TriStateTrue, or TriStateAuto and the enumeration has the FlagsAttribute attribute applied, this validator will not check whether a value provided in such a way actually is actually one of the enumeration's defined values.

See Also