Wpf textbox validating
"Provide your IP address" but only allow IPv4 address and not IPv6 Not helpful tooltips Visually change the styling of the field and not displaying any helpful text. This will keep the user guessing what they did wrong and that could get very frustrating. Programming is not that easy but it is nice for programmers as it enforces rules at the data layer. Validation If you bind an Integer property to Text Box you automatically get integer validation.
Main issue here is with accessibility as some people may not even notice a color change. Clearing values on error (Not saving form state) Let me say that the larger the form it the less your conversion rate will be, forms should be small / short and only capture additional information you have not captured yet. The business / data layers does not have to care how enforcement of those rules bubble to the UI layer. In fact you need a converter for an empty Text Box to not send string.empty.
In a case where there is a dependency between fields and if changing the value forces another field to update, again notify the user about the change to a previous field they filled out.
Not covering all use cases or misleading content/labels If you are validating a field, make sure all use cases are covered.
Errors in parentheses to indicate that it's an attached property as opposed to a property of the Text Box. This allows for creating templates that appear to change the control being adorned.And if you start with a reasonable default in the field, any changes should be assumed to be intentional, and so if invalid need correcting by the user.An exception to this, though, would be cases where an empty field is invalid by itself, but can be extrapolated to a reasonable default, in which case faded-out and/or italicized text within to indicate the default is useful.The question is, what are some rules/no-no's on validating the input during user interaction?Do we change the values from incorrect ones to a default correct one? Tooltips seems to be a viable communication method. Automatically changing a value You should be notifying a user that a potential issue / mistake was made and suggest the right answer if you are able to do so.
For example, a number of network-dependent applications like IM or torrent clients use as their default STUN/TURN server, and indicate this in configuration with a blank textbox that can be set if desired, but that falls back to the default when blank, and which displays the default as an example setting as noted.