Save space for error messages in order to avoid page jumps on validation
See original GitHub issueWhich package is this issue related to?
ffe-form
Describe your issue (screenshots welcome!)
In some instances the page layout may jump when validation error messages are inserted, because an extra line of content is injected into the page flow.
Without error message:
With error message:
This can be avoided by saving the space needed for an error message by default (padding, height, etc), then positioning the error message absolute
or in other ways style it so that it does not affect the height of its containing block.
What is the expected behavior?
The page flow should not change on validation.
What is the actual behavior?
The page jumps.
Steps to reproduce
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Designing Better Error Messages UX - Smashing Magazine
Let's explore when error messages should live above input fields and ... If the page is fully refreshed upon validation, the error summary ......
Read more >Form validation best practices. A case study of how to get it right
Instead, focus on concise, directional, friendly copy for you error messages. Avoid long list summaries of errors at the top of your page, ......
Read more >Should I make space for error messages in forms?
I think you're ignoring the use of immediate validation. Yes, it would push the rest of the form down, but the user hasn't...
Read more >Best Practices for Hints and Validation in Web Forms - WebFX
Any error message should communicate the following as best it can: List all errors: To make sure a user gets the form on...
Read more >How to Report Errors in Forms: 10 Design Guidelines
1. Aim for Inline Validation Whenever Possible · 2. Indicate Successful Entry for Complex Fields · 3. Keep Error Messages Next to Fields...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll try that later, and if not I can swap the error element to a
p
.:first-of-type
did work, so I could doBut I kinda threw up in my mouth a little so unless your trick works I’ll go with a
p
.