microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.34k stars 675 forks source link

TextBox InputValidationKind="Inline" not properly aligned #4640

Open omnilogix opened 3 years ago

omnilogix commented 3 years ago

Describe the bug

When applying InputValidationKind="Inline" on a TextBox, the error message is right-aligned and cut off

Steps to reproduce the bug

Steps to reproduce the behavior: Xaml: <TextBox InputValidationKind="Inline" Header="Test" Text="{x:Bind ViewModel.Test1, Mode=TwoWay}" HorizontalAlignment="Left" MaxWidth="200" />

ViewModel property:

[Required]
[EmailAddress(ErrorMessage = "Invalid email address")]
public string Test1 
{ 
    get => _Test1; 
    set { SetField(ref _Test1, value); Validate(value); }
}

Implement INotifyDataErrorInfo on ViewModel

Expected behavior

Left aligned error text

Screenshots

image

Version Info

NuGet package version:

image

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

InputValidation ErrorTemplate option is missing for customization

StephenLPeters commented 3 years ago

I was actually under the impression that input validation wasn't supported in winui3, but it seems to be working albeit with this bug. @MikeHillberg @Austin-Lamb @ryandemopoulos

mdtauk commented 3 years ago

I was actually under the impression that input validation wasn't supported in winui3, but it seems to be working albeit with this bug. @MikeHillberg @Austin-Lamb @ryandemopoulos

I think there may be limited support at first, with fuller support post 3.0 release

MikeHillberg commented 3 years ago

Yes, it's still in preview, not in release yet.

omnilogix commented 3 years ago

I updated to the 0.5 official release. The InputValidationXXXX properties have been removed, so I'll close this for now

StephenLPeters commented 3 years ago

@omnilogix the input validation api's are preview, so they are not included in release builds, only prerelease. hence why they are not in the 0.5 official release.

omnilogix commented 3 years ago

@omnilogix the input validation api's are preview, so they are not included in release builds, only prerelease. hence why they are not in the 0.5 official release.

Got it! Let's leave it open then.

github-actions[bot] commented 1 year ago

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 commented 1 year ago

Any progress on this item?