You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use New-SnipeitLicense, it fails if a license_email parameter is provided.
Your Environment
SnipeitPS Module version used: 1.10.227
Operating System and PowerShell version: Win10 Pro 10.0.19045, PS 7.2.11
Expected Behavior
Should take a string email address input and successfully create a license with it.
Current Behavior
Fails with an error that ValidateLength can not be applied on a non-string.
Possible Solution
The function appears to cast the license_email parameter to a mailaddress, which causes ValidateLength to fail, as ValidateLength only works on strings. Removing the validation, or casting to a string instead of a mailaddress, both worked on my end.
Steps to Reproduce (for bugs)
Run New-SnipeitLicense with dummy parameters, and pass a license_email parameter as well.
The text was updated successfully, but these errors were encountered:
Context
When trying to use New-SnipeitLicense, it fails if a license_email parameter is provided.
Your Environment
Expected Behavior
Should take a string email address input and successfully create a license with it.
Current Behavior
Fails with an error that ValidateLength can not be applied on a non-string.
Possible Solution
The function appears to cast the license_email parameter to a mailaddress, which causes ValidateLength to fail, as ValidateLength only works on strings. Removing the validation, or casting to a string instead of a mailaddress, both worked on my end.
Steps to Reproduce (for bugs)
Run New-SnipeitLicense with dummy parameters, and pass a license_email parameter as well.
The text was updated successfully, but these errors were encountered: