在表单顶部显示错误消息? 或者在每个单独的字段旁边?
大家认为哪种方法更好呢?
Which approach do you all think is better?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
大家认为哪种方法更好呢?
Which approach do you all think is better?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
识别有错误的字段无疑很重要。 但是,顶部的摘要让用户知道下面存在错误对于长表单可能会有所帮助。 此外,您可以在顶部摘要部分添加更多详细信息,而下面可能没有足够的空间。
Identifying the field with an error is important, definitely. However, a summary at the top letting the user know that there are errors below can be helpful for a long form. Additionally, you can put more details in the top summary section that you might not have room for below.
我们在每个有错误的字段旁边提供一个小指示器。 当您将鼠标悬停在指示器上时,工具提示会为您提供需要修复的内容。 然后,我们还会在smae时间给出总结,以便他们可以看到他们需要修复的所有错误。
We supply a small indicator next to each field with an error. When you roll over the indicator a tool tip gives you what needs to be fixed. We then also give a summary at the smae time so they can see all of the errors they need to fix.
我将错误摘要放在表单顶部,其中提供了有关为什么字段值不正确的详细信息,例如“Field1 是必需的且必须是整数”。 我还在出错的字段上添加了视觉指示器,通常是字段旁边的星号或更改输入区域的颜色。
I put a summary of the errors at the top of the form that gives details as to why a field value is incorrect such as "Field1 is Required and must be an integer". I also add visual indicators on the field that errored, typically an asterisk next to the field or changing the color of the input area.
这总是取决于具体情况,但是......
我更喜欢在每个字段旁边做一个不显眼的指示器(*也许),并在表单较长的表单顶部(或底部)显示更详细的消息或摘要消息。
如果表格较短,您可能无需提供“摘要”即可逃脱。我改变了主意,您可能应该提供摘要。It will always depend on the situation, but...
I prefer to do a non-obtrusive indicator (* perhaps) beside each field and show more detailed messages or a summary message at the top (or bottom) of the form with longer forms.
If the form is shorter, you can probably get away without providing a "summary".I changed my mind on this, you should probably provide a summary.在每个字段旁边,用独特的颜色或易于区分的标记突出显示每个字段,因此问题所在是不言而喻的,尤其是在长表单上。 还要在每个故障旁边放置一个帮助图标,以提供更多信息,以防某些用户需要。 此外,不要忘记在两次故障之间保留正确的数据。
Next to each field, highlighting each field in a distinctive color or with an easily distinguishable mark, so it's self evident where the problems are, especially on a long form. Also place a help icon next to each failure providing more information in case it's needed by some users. In addition, do not forget to preserve the data that's correct in between failures.