# 当用户名正确但密码字符数不足时，错误未突出显示

**URL:** <https://meta.discourse.org/t/error-is-not-highlighted-when-username-is-correct-but-not-enough-characters-in-password/381505>\
**Category:** Bug\
**Tags:** pr-welcome, ux, signup\
**Created:** [2025年九月3日 23:44 UTC](https://meta.discourse.org/t/error-is-not-highlighted-when-username-is-correct-but-not-enough-characters-in-password/381505 "2025-09-03T23:44:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)\
**Post date:** [2025年九月3日 23:44 UTC](https://meta.discourse.org/t/error-is-not-highlighted-when-username-is-correct-but-not-enough-characters-in-password/381505/1 "2025-09-03T23:44:02Z")

</div>

注册新论坛时，Discourse 在注册过程中显示错误的几种方式不一致。

用户名和密码均为空时：

 ![Screenshot 2025-09-03 at 4.39.14 PM](https://global.discourse-cdn.com/meta/original/4X/3/d/f/3df9363a0565eda6c023df6beab79ce3a588ad2c.png)

输入了用户名但密码字段为空时，会显示“无法为空”错误，但输入框未高亮显示：

 ![Screenshot 2025-09-03 at 4.40.35 PM](https://global.discourse-cdn.com/meta/original/4X/a/7/0/a7017bf186b2d2cc354f1b931ddc71dea5942005.png)

注册时输入的字符少于要求的字符数，没有红色高亮显示也没有错误提示：

 ![Screenshot 2025-09-03 at 4.37.50 PM](https://global.discourse-cdn.com/meta/original/4X/1/f/9/1f92c7f200195e0b8a2965f478c362ceaa67d0bf.png)

---

_[View the full topic](https://meta.discourse.org/t/error-is-not-highlighted-when-username-is-correct-but-not-enough-characters-in-password/381505)._
