File tree Expand file tree Collapse file tree 1 file changed +26
-10
lines changed Expand file tree Collapse file tree 1 file changed +26
-10
lines changed Original file line number Diff line number Diff line change 1
1
ValidateExtension
2
2
-----------------
3
+
4
+
5
+
6
+
3
7
### Synopsis
4
8
Validates Extensions
5
9
10
+
11
+
6
12
---
13
+
14
+
7
15
### Description
8
16
9
17
Validates that a parameter or object has one or more extensions.
10
18
11
19
This creates a [ ValidatePattern] that will ensure the extension matches.
12
20
21
+
22
+
13
23
---
24
+
25
+
14
26
### Examples
15
27
#### EXAMPLE 1
16
28
``` PowerShell
@@ -42,49 +54,53 @@ $FilePath
42
54
```
43
55
$FilePath
44
56
} -Parameter @{FilePath="foo.txt"}
57
+
58
+
45
59
---
60
+
61
+
46
62
### Parameters
47
63
#### ** Extension**
48
64
49
65
The extensions being validated.
50
66
51
67
52
68
53
- > ** Type** : ``` [String[]] ```
54
69
55
- > ** Required** : true
56
70
57
- > ** Position** : 1
58
71
59
- > ** PipelineInput** : false
72
+ | Type | Required| Position| PipelineInput|
73
+ | ------------| --------| --------| -------------|
74
+ | ` [String[]] ` | true | 1 | false |
60
75
61
76
62
77
63
- ---
64
78
#### ** VariableAST**
65
79
66
80
A variable expression.
67
81
If this is provided, will apply a ``` [ValidatePattern({})] ``` attribute to the variable, constraining future values.
68
82
69
83
70
84
71
- > ** Type** : ``` [VariableExpressionAst] ```
72
85
73
- > ** Required** : false
74
86
75
- > ** Position** : named
76
87
77
- > ** PipelineInput** : true (ByValue)
88
+ | Type | Required| Position| PipelineInput |
89
+ | -------------------------| --------| --------| --------------|
90
+ | ` [VariableExpressionAst] ` | false | named | true (ByValue)|
91
+
92
+
78
93
79
94
80
95
81
96
---
97
+
98
+
82
99
### Syntax
83
100
``` PowerShell
84
101
ValidateExtension [-Extension] <String[]> [<CommonParameters>]
85
102
```
86
103
``` PowerShell
87
104
ValidateExtension [-Extension] <String[]> [-VariableAST <VariableExpressionAst>] [<CommonParameters>]
88
105
```
89
- ---
90
106
You can’t perform that action at this time.
0 commit comments