ValidateScriptAttribute 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.
Class for validating against a script block.
public ref class ValidateScriptAttribute sealed : System::Management::Automation::ValidateEnumeratedArgumentsAttribute
	public sealed class ValidateScriptAttribute : System.Management.Automation.ValidateEnumeratedArgumentsAttribute
	type ValidateScriptAttribute = class
    inherit ValidateEnumeratedArgumentsAttribute
	Public NotInheritable Class ValidateScriptAttribute
Inherits ValidateEnumeratedArgumentsAttribute
		- Inheritance
 - 
				ValidateScriptAttribute
 
Constructors
| ValidateScriptAttribute(ScriptBlock) | 
		 Initializes a new instance of the ValidateScriptAttribute class.  | 
        	
Properties
| ErrorMessage | 
		 Gets or sets the custom error message that is displayed to the user.
The item being validated and the validating scriptblock is passed as the first and second
formatting argument.
 
	 | 
        	
| ScriptBlock | 
		 Gets the scriptblock 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) |