Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-SnipeitLicense fails when license_email parameter provided #299

Open
cavesnail opened this issue Jun 1, 2023 · 0 comments
Open

New-SnipeitLicense fails when license_email parameter provided #299

cavesnail opened this issue Jun 1, 2023 · 0 comments

Comments

@cavesnail
Copy link

Context

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.

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

No branches or pull requests

1 participant