# 通过添加图片或图标而不是两者来消除错误信息

**URL:** <https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896>\
**Category:** Bug\
**Tags:** badges, fixed\
**Created:** [2024年八月22日 14:39 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896 "2024-08-22T14:39:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年八月22日 14:39 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896/1 "2024-08-22T14:39:38Z")

</div>

当您在选择图像或图标之前意外提交正在创建的徽章时，您必须同时添加两者才能消除错误消息并允许保存。我认为添加其中一个就足够了。

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2024年八月22日 15:48 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896/2 "2024-08-22T15:48:48Z")

</div>

可能与 [Badges lost their images in Edit forms, cannot edit them](https://meta.discourse.org/t/badges-lost-their-images-in-edit-forms-cannot-edit-them/322680) 也有关

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2024年八月25日 19:21 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896/5 "2024-08-25T19:21:32Z")

</div>

不，这与那个无关，下周会看一下。

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2024年八月26日 18:32 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896/6 "2024-08-26T18:32:48Z")

</div>

已修复：

> <https://github.com/discourse/discourse/pull/28555>
>
> In FormKit you can add error on an existing field existing in the DOM, but you c…an also set an arbitrary error on a virtual field not existing in the DOM.
> 
> When revalidating existing data, we are only resetting real fields. This commit adds \`removeError(name)\` to allow you to manually manage virtual fields. \`removeError\` is available in the same helpers where \`addError\` is available.

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2024年八月26日 18:33 UTC](https://meta.discourse.org/t/getting-rid-of-error-message-by-adding-image-or-icon-instead-of-both/322896/7 "2024-08-26T18:33:01Z")

</div>


