mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-30 10:02:35 -05: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:
@ -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)]
|
||||||
|
Reference in New Issue
Block a user