Having trouble getting client-side validation to work on New-UDInput

I’m trying to enforce client side validation on a form, and no matter what pattern i use, all my variables return null.

Code:

$dashboard = New-UDDashboard -Title "Validation" -Content {
    New-UDRow -Endpoint {
        New-UDColumn -Endpoint {
            New-UDInput -Title 'Test' -Endpoint {
                param(
                    [ValidatePattern('^[\w.]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$')]
                    $AlternateEmail
                )
            } -Validate
        }
    }
}
Start-UDDashboard -Port 10001 -Dashboard $dashboard 

What happens:

Anybody successfully doing client side validation?

I have a PR to fix this. There was a serialization change in 2.3 that broke a few things that I didn’t realize were broken.

1 Like