ValidatePatternAttribute 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 matches the RegexPattern.
public ref class ValidatePatternAttribute sealed : System::Management::Automation::ValidateEnumeratedArgumentsAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class ValidatePatternAttribute : System.Management.Automation.ValidateEnumeratedArgumentsAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type ValidatePatternAttribute = class
inherit ValidateEnumeratedArgumentsAttribute
Public NotInheritable Class ValidatePatternAttribute
Inherits ValidateEnumeratedArgumentsAttribute
- Inheritance
-
ValidatePatternAttribute
- Attributes
Constructors
ValidatePatternAttribute(String) |
Initializes a new instance of the ValidatePatternAttribute class. |
Properties
ErrorMessage |
Gets or sets the custom error message pattern that is displayed to the user.
The text representation of the object being validated and the validating regex is passed as
the first and second formatting parameters to the ErrorMessage formatting pattern.
|
Options |
Gets or sets the Regex options to be used in the validation. |
RegexPattern |
Gets the Regex pattern to be used in the validation. |
Methods
Validate(Object, EngineIntrinsics) |
Calls ValidateElement in each element in the enumeration argument value. (Inherited from ValidateEnumeratedArgumentsAttribute) |
ValidateElement(Object) |
Abstract method to be overridden by subclasses, implementing the validation of each parameter argument. (Inherited from ValidateEnumeratedArgumentsAttribute) |