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

Input Validation applied for {x:Bind} but not {Binding} #4642

Open
omnilogix opened this issue Mar 24, 2021 · 7 comments
Open

Input Validation applied for {x:Bind} but not {Binding} #4642

omnilogix opened this issue Mar 24, 2021 · 7 comments
Labels
area-Binding area-InputValidation bug Something isn't working product-winui3 WinUI 3 issues team-Controls Issue for the Controls team v0.5 Issues introduced in the Project Reunion 0.5 prerelease

Comments

@omnilogix
Copy link

omnilogix commented Mar 24, 2021

Describe the bug

When using InputValidation, the validation does not get applied to bindings of type {Binding}, but does for {x:Bind}

Steps to reproduce the bug

Run attached solution

Reunion.zip

Xaml:

    <Grid x:Name="_Grid">
        <Grid.Resources>
            <local:MainWindowViewModel x:Name="VM" />
        </Grid.Resources>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
            <TextBox InputValidationKind="Inline" Header="Test1" Text="{x:Bind VM.Test1, Mode=TwoWay}" HorizontalAlignment="Left" Width="200" />
            <TextBox InputValidationKind="Inline" Header="Test2" Text="{Binding VM.Test2, Mode=TwoWay}" HorizontalAlignment="Left" Width="200" />
        </StackPanel>
    </Grid>

Expected behavior

Correct validation regardless of binding type

Screenshots

image

Version Info

image

NuGet package version:

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

After an invalid input is made, entering valid data and tabbing away does not clear the error
Also note misalignment issue documented here: #4640 (comment)
InputValidation seems to have many issues related to consistent application across controls, and functionality like ErrorTemplate, error positioning, etc.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2021
@omnilogix
Copy link
Author

Please move this to the ProjectReunion repo

@omnilogix omnilogix changed the title Input Validation applied for (x:Bind} but not {Binding} Input Validation applied for {x:Bind} but not {Binding} Mar 24, 2021
@StephenLPeters StephenLPeters added area-Binding area-InputValidation v0.5 Issues introduced in the Project Reunion 0.5 prerelease team-Controls Issue for the Controls team product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Mar 24, 2021
@StephenLPeters
Copy link
Contributor

Please move this to the ProjectReunion repo

Why do you want this moved? it seems likely a winui issue.

@omnilogix
Copy link
Author

Because I keep getting confused what belongs to WinUI 3 / Project Reunion / Windows Toolkit... ;)
If it belongs here, great!

@omikhailov
Copy link

AFAIK, this is by design

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@omnilogix
Copy link
Author

Any progress on this item?

@duncanmacmichael duncanmacmichael added the bug Something isn't working label Oct 31, 2023
@michael-hawker
Copy link
Collaborator

Tied to Parent issue: #179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Binding area-InputValidation bug Something isn't working product-winui3 WinUI 3 issues team-Controls Issue for the Controls team v0.5 Issues introduced in the Project Reunion 0.5 prerelease
Projects
None yet
Development

No branches or pull requests

5 participants