Skip to content

ValidateScriptBlock should return true when the input is not a ScriptBlock #125

Closed
@StartAutomating

Description

@StartAutomating

To explain the paradoxical title:

Since [ValidateTypes] allows a parameter to be one or more strong types, it's valid to have a parameter that might be a [ScriptBlock].

Thus if [ValidateScriptBlock] failed in these cases, it would prevent the parameter from having a non-scriptblock value, even if that was the author's intent.

Therefore, ValidateScriptBlock should return true if the validation is not a scriptblock.

This sort of behavior may be required in other specific type validations.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions