# 사용자가 커스텀 필드가 비어 있을 때 채우도록 강제하는 방법은?

**URL:** <https://meta.discourse.org/t/how-can-i-force-users-to-fill-in-a-custom-field-when-it-s-empty/225929>\
**Category:** Development\
**Created:** [5월 2, 2022, 10:11오후 UTC](https://meta.discourse.org/t/how-can-i-force-users-to-fill-in-a-custom-field-when-it-s-empty/225929 "2022-05-02T22:11:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)\
**Post date:** [5월 2, 2022, 11:28오후 UTC](https://meta.discourse.org/t/how-can-i-force-users-to-fill-in-a-custom-field-when-it-s-empty/225929/4 "2022-05-02T23:28:02Z")

</div>

> [@Jacky2](#):
>
> 답변하지 않은 사용자를 어떻게 가져올 수 있나요?

해당 질문에 대해, 답변되지 않은 질문은 데이터베이스에서 NULL로 저장된다고 가정하면, `where.not(value: [nil])`을 `where(value: nil)`로 대체하기만 하면 됩니다.

`where(value: [nil, ""])`를 사용하여 빈 문자열 또는 NULL을 검색할 수도 있습니다. 이는 SQL에서 `WHERE (something.value IS NULL OR something.value = "")`와 동일합니다. 사용자가 빈 필드를 제출할 때 NULL에서 ""로 변경될 가능성이 있는지, 아니면 그 반대의 경우가 더 가능한지는 정확히 확신할 수 없습니다.

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-force-users-to-fill-in-a-custom-field-when-it-s-empty/225929)._
