OnValidate event triggers twice for textbox in form

Hello,

Entering a single character in a textbox triggers the OnValidate event twice in a form.

See the code below:

New-UDPage -Name test -Title test -Url "/test" -Navigation $Cache:Navigation {   
    New-UDForm -Children {
        New-UDTypography -Text '1: Enter any character in the Textbox => Toast notification displays twice for just one character' -Variant subtitle1
        New-UDTextbox -Id 'Textbox' -Label 'Textbox' -Placeholder 'Enter any character to see the bug'
    } -OnValidate {
        Show-UDToast -Message $EventData.Textbox
        New-UDFormValidationResult -Valid
    } -OnSubmit {
    
    }
}

I don’t seem to have seen this issue declared on the github. If necessary I can open it.

Product: PowerShell Universal
Version: 1.5.18

This is a bug and feel free to open an issue.

Done.

OnValidate event triggers twice for textbox in form · Issue #174 · ironmansoftware/issues (github.com)

1 Like

Thanks :slight_smile: