mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 10:17:44 -06:00
Add 'ValidateRange' to 'Percent' Parameter for 'Update-Progress' Helper Function
This will insure that the passed value is neither below zero nor higher than 100 Co-authored-by: Martin Wiethan <47688561+Marterich@users.noreply.github.com>
This commit is contained in:
parent
bea7726587
commit
78178b0fba
@ -15,6 +15,7 @@ function Update-Progress {
|
|||||||
[string]$StatusMessage,
|
[string]$StatusMessage,
|
||||||
|
|
||||||
[Parameter(Mandatory, position=1)]
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[ValidateRange(0,100)]
|
||||||
[int]$Percent,
|
[int]$Percent,
|
||||||
|
|
||||||
[Parameter(position=2)]
|
[Parameter(position=2)]
|
||||||
|
Loading…
Reference in New Issue
Block a user