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-UDInput Fails Validation With Content and Endpoint #1130

Closed
awickham10 opened this issue Sep 17, 2019 · 1 comment
Closed

New-UDInput Fails Validation With Content and Endpoint #1130

awickham10 opened this issue Sep 17, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@awickham10
Copy link

Describe the Issue

It appears that when using -Validate, -Content, and -Endpoint on New-UDInput the validation fails. The frontend ends up calling a URL with a null reference to the endpoint.

http://localhost/api/internal/component/input/validate/null/MyFieldName

To Reproduce

Put this in a dashboard and do not fill out the field. The URL above will be called and get a 404.

        New-UDInput -Title 'Request' -Validate -Content {
            New-UDInputField -Type 'textbox' -Name 'MyField'
        } -Endpoint {
            param (
                [Parameter(Mandatory)]
                $MyField
            )
        }

Expected behavior

Validation to work properly with -Content and -Endpoint.

Script Sample

This works properly.

powershell
        New-UDInput -Title 'Request' -Validate -Endpoint {
            param (
                [Parameter(Mandatory)]
                $MyField
            )
        }

Version Information

  • Operating System: Windows 10
  • PowerShell Version: 5.1.17134.858
  • Universal Dashboard Version: 2.6
  • UD Hosting Method: PowerShell
@awickham10 awickham10 added the bug Something isn't working label Sep 17, 2019
@adamdriscoll
Copy link
Member

#1136 - Kinda related. Moral of the story: make validation work better when using New-UDInputField.

@adamdriscoll adamdriscoll added this to the 2.6.1 milestone Sep 24, 2019
adamdriscoll added a commit that referenced this issue Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants