ValidateSetAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Validates that each parameter argument is present in a specified set
public ref class ValidateSetAttribute sealed : System::Management::Automation::ValidateEnumeratedArgumentsAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class ValidateSetAttribute : System.Management.Automation.ValidateEnumeratedArgumentsAttribute
[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field)]
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class ValidateSetAttribute : System.Management.Automation.ValidateEnumeratedArgumentsAttribute
type ValidateSetAttribute = class
inherit ValidateEnumeratedArgumentsAttribute
Public NotInheritable Class ValidateSetAttribute
Inherits ValidateEnumeratedArgumentsAttribute
- Inheritance
-
ValidateSetAttribute
- Attributes
Constructors
| ValidateSetAttribute(String[]) |
Initializes a new instance of the ValidateSetAttribute class |
| ValidateSetAttribute(Type) |
Initializes a new instance of the ValidateSetAttribute class. Valid values is returned dynamically from a custom class implementing 'IValidateSetValuesGenerator' interface. |
Properties
| ErrorMessage |
Gets or sets the custom error message that is displayed to the user The item being validated and a text representation of the validation set is passed as the first and second formatting argument to the ErrorMessage formatting pattern. |
| IgnoreCase |
Gets a flag specifying if we should ignore the case when performing string comparison. The default is true. |
| ValidValues |
Gets the values in the set |
Methods
| Validate(Object, EngineIntrinsics) |
Calls ValidateElement in each element in the enumeration argument value. (Inherited from ValidateEnumeratedArgumentsAttribute) |
| ValidateElement(Object) |
Overridden by subclasses to implement the validation of each parameter argument (Inherited from ValidateEnumeratedArgumentsAttribute) |