File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments