Skip to content

Conversation

@Gijsreyn
Copy link
Contributor

@Gijsreyn Gijsreyn commented Nov 2, 2025

PR Summary

This PR fixes a bug where parameter constraints (minValue, maxValue, minLength, maxLength, allowedValues) were not being validated when parameters used their defaultValue. Constraints were only validated for runtime input parameters, allowing invalid default values to pass through unchecked.

PR Context

Fix #1228.

@Gijsreyn
Copy link
Contributor Author

Gijsreyn commented Nov 3, 2025

Thanks for the quick check @SteveL-MSFT. Resolved the remarks. Slightly rewritten the constraints tests.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Nov 4, 2025
Merged via the queue into PowerShell:main with commit ec33ed2 Nov 4, 2025
19 checks passed
@Gijsreyn Gijsreyn deleted the gh-1228/main/fix-defaultvalue-constraint branch November 4, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defaultValue on constraints are not being evaluated

2 participants