Validate Range Error for Int64 Max Value
Posted: Tue Sep 01, 2020 5:35 pm
Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.181
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19041.0
When adding ValidateRange in a function to an Int64 variable, it incorrectly assumes the value for an Int32 maxvalue (2147483647) and rejects the Int64 maxvalue entry of 9223372036854775807.
When coded manually, the validation works as expected.
Build: v5.7.181
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19041.0
When adding ValidateRange in a function to an Int64 variable, it incorrectly assumes the value for an Int32 maxvalue (2147483647) and rejects the Int64 maxvalue entry of 9223372036854775807.
When coded manually, the validation works as expected.
- function ConvertSpeed {
- param
- (
- [Parameter(Position = 0)]
- [ValidateRange(0, 9223372036854775807)]
- [int64]$Speed
- )
- ...
- }