Skip to content

Commit a3544ac

Browse files
committed
Rename the -Object parameter to -InputObject
1 parent 85bfacd commit a3544ac

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/Assert-Validation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function Assert-Validation {
1414
param (
1515
# The object to validate.
1616
[Parameter(Mandatory, Position = 1, ValueFromPipeline)]
17-
[object] $Object,
17+
[object] $InputObject,
1818

1919
# The set of validation rules to apply.
2020
[Parameter(Mandatory, Position = 2)]
@@ -27,7 +27,7 @@ function Assert-Validation {
2727
foreach ($property in $RuleSet.Keys) {
2828
foreach ($rule in @($RuleSet[$property])) {
2929
$validator = [Validator] $rule
30-
if (-not $validator.IsValid($Object.$property)) {
30+
if (-not $validator.IsValid($InputObject.$property)) {
3131
$errors[$property] = $validator.Reason
3232
break
3333
}

Sources/Test-Validation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function Test-Validation {
1414
param (
1515
# The object to validate.
1616
[Parameter(Mandatory, Position = 1, ValueFromPipeline)]
17-
[object] $Object,
17+
[object] $InputObject,
1818

1919
# The set of validation rules to apply.
2020
[Parameter(Mandatory, Position = 2)]
@@ -25,7 +25,7 @@ function Test-Validation {
2525
foreach ($property in $RuleSet.Keys) {
2626
foreach ($rule in @($RuleSet[$property])) {
2727
$validator = [Validator] $rule
28-
if (-not $validator.IsValid($Object.$property)) { return $false }
28+
if (-not $validator.IsValid($InputObject.$property)) { return $false }
2929
}
3030
}
3131

0 commit comments

Comments
 (0)