File tree Expand file tree Collapse file tree 1 file changed +80
-0
lines changed
Expand file tree Collapse file tree 1 file changed +80
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ ValidatePropertyName
3+ --------------------
4+ ### Synopsis
5+ Validates Property Names
6+
7+ ---
8+ ### Description
9+
10+ Validates that an object has one or more property names.
11+
12+ ---
13+ ### Examples
14+ #### EXAMPLE 1
15+ ``` PowerShell
16+ {
17+ param(
18+ [ValidatePropertyName(PropertyName='a','b')]
19+ $InputObject
20+ )
21+ } | .>PipeScript
22+ ```
23+
24+ #### EXAMPLE 2
25+ ``` PowerShell
26+ [PSCustomObject]@{a='a';b='b'} |
27+ .> {
28+ param(
29+ [ValidatePropertyName(PropertyName='a','b')]
30+ [vfp]
31+ $InputObject
32+ )
33+ ```
34+ $InputObject
35+ }
36+ #### EXAMPLE 3
37+ ``` PowerShell
38+ @{a='a'} |
39+ .> {
40+ param(
41+ [ValidatePropertyName(PropertyName='a','b')]
42+ [vfp]
43+ $InputObject
44+ )
45+ ```
46+ $InputObject
47+ }
48+ ---
49+ ### Parameters
50+ #### ** PropertyName**
51+
52+ The property names being validated.
53+
54+
55+
56+ | Type | Requried| Postion| PipelineInput|
57+ | ----------------| --------| -------| -------------|
58+ | ``` [String[]] ``` | true | 1 | false |
59+ ---
60+ #### ** VariableAST**
61+
62+ A variable expression.
63+ If this is provided, will apply a ``` [ValidateScript({})] ``` attribute to the variable, constraining future values.
64+
65+
66+
67+ | Type | Requried| Postion| PipelineInput |
68+ | -----------------------------| --------| -------| --------------|
69+ | ``` [VariableExpressionAst] ``` | false | named | true (ByValue)|
70+ ---
71+ ### Syntax
72+ ``` PowerShell
73+ ValidatePropertyName [-PropertyName] <String[]> [<CommonParameters>]
74+ ```
75+ ``` PowerShell
76+ ValidatePropertyName [-PropertyName] <String[]> [-VariableAST <VariableExpressionAst>] [<CommonParameters>]
77+ ```
78+ ---
79+
80+
You can’t perform that action at this time.
0 commit comments