Skip to content

In WinUI 3 - What is the correct way to display validation error message text under each input field in XAML? #7388

Answered by ghost
RossCoeH asked this question in Q&A
Discussion options

You must be logged in to vote

I recently saw this discussion and decided to build a quick sample with TextBox - it could definitely use support from WinUI, having an equivalent of INotifyDataErrorInfo (and maybe a new interface for controls that support input validation) would make this scenario a whole lot nicer. This solution is not fully polished, I might work on a nicer version of it eventually, but for now it's just a proof of concept with UWP/WinUI 2. Should be easy to port to WinUI 3, it's just a few attached properties and a custom style for the input fields:

InputValidation.zip

Replies: 14 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Laim
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Laim
Comment options

Comment options

You must be logged in to vote
1 reply
@RossCoeH
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@RossCoeH
Comment options

Answer selected by RossCoeH
Comment options

You must be logged in to vote
7 replies
@omikhailov
Comment options

@RossCoeH
Comment options

@ghost1372
Comment options

@thomasjoscht
Comment options

@ghost1372
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #7386 on July 18, 2022 14:56.