-
Notifications
You must be signed in to change notification settings - Fork 410
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
RFE: show the cause of a validation error on TextModeLayout (on iOS) #2458
Comments
Do you have a suggestion for how this should look? |
Yes, now I have a suggestion for how it should look. I implemented this RFE with a preliminary code, as you can see in this video: Basically, the error message is shown for two second in place of the label on the left of the InputComponent (or on right of the InputComponent for RTL languages). This solution never breaks the layout, because the error message is trimmed to fit the available space. If you would like to test (and to comment and/or to improve) my code, replace in your code Code:
In the previous code, my |
Great job! Do you want to incorporate this feature into the validator with a PR? |
Thank you, I'm glad that you like my solution. Yes, I'll do a PR to incorporate this feature. Do I have to add a method to enable and to disable this feature? Should it be enable or disabled by default? |
That would be a good practice, I think it should be on by default as right now this information isn't visible anywhere. I would also change |
Related question: https://stackoverflow.com/questions/50886775/codename-one-textmodelayout-on-ios-and-validation-error-feedback
I copy the question for reference:
The
TextModeLayout
, on iOS, produces only a red cross on the right of a text field to indicate an invalid input (if we use aValidator
).In general, this is fine. However, I added a
LengthConstraint(8)
to a password field and I'm worried if users understand that there is a requirement for lengtness.Is there a standard way in the iOS design to provide the user the cause of a validation error, or the only way is to use the Material Design also on iOS (that means set to
true
the theme consttextComponentOnTopBool
)?Code:
The text was updated successfully, but these errors were encountered: