# 会員登録の必須項目について

**URL:** <https://community.shopify.com/t/topic/113213>\
**Category:** 技術的なQ＆A\
**Created:** [April 11, 2022, 8:35am UTC](https://community.shopify.com/t/topic/113213 "2022-04-11T08:35:34Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

Shopifyの会員登録フォーム（Dawn）で独自追加項目を必須化したいが、requiredが効かない問題と、電話番号の保存可否がテーマ。コード断片の提示あり。

- 指摘事項: フォームタグに「novalidate: 'novalidate'」が含まれている可能性。novalidateはブラウザのHTML5バリデーション（required等）を無効化する属性。
- 参考情報: Debutテーマを例にした類似事例へのリンクが共有。

- 進展: 指摘どおり編集した結果、必須化は機能するようになった。

- 新たな課題: 電話番号を入力して登録しても、管理画面の顧客情報に電話番号が保存されない。原因は未判明。使用テーマはDawn。

- 結果/状態: 必須化の問題は解決。電話番号が管理画面に反映されない点は未解決で、追加の原因特定・対応策が求められている。

- 備考: 掲載のコード断片が理解に重要。

<div class="post-metadata">

**Author:** ![datadesign](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@datadesign](https://community.shopify.com/u/datadesign)\
**Post date:** [April 11, 2022, 8:35am UTC](https://community.shopify.com/t/topic/113213/1 "2022-04-11T08:35:34Z")

</div>

会員登録に独自で追加した項目を必須入力としたいのですが、requiredをタグ内に入れても動作しません。

コードを添付いたしますので、ご教示いただけますでしょうか。

※デフォルトでメールアドレスとパスワードのみ必須となっているようです。

宜しくお願いいたします。

\<input type="text" name="customer[last\_name]" id="RegisterForm-LastName" aria-required="true"

{% if form.last\_name %}value=“{{ form.last\_name }}”{% endif %}  
autocomplete=“family-name”  
placeholder=“{{ ‘customer.register.last\_name’ | t }}”

> 

{{ 'customer.register.last\_name' | t }}

{{ 'customer.register.first\_name' | t }}

電話番号

{{ 'customer.register.email' | t }}
{%- if form.errors contains 'email' -%} {{ form.errors.translated\_fields['email'] | capitalize }} {{ form.errors.messages['email'] }}. {%- endif -%}
{{ 'customer.register.password' | t }}
{%- if form.errors contains 'password' -%} {{ form.errors.translated\_fields['password'] | capitalize }} {{ form.errors.messages['password'] }}. {%- endif -%} {{ 'customer.register.submit' | t }} {%- endform -%}

---

<div class="post-metadata">

**Author:** ![Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/anonymous_44fbe07fc59d9ccaacd70575fd5a5155/32/194200_2.png) [@Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://community.shopify.com/u/Anonymous_44fbe07fc59d9ccaacd70575fd5a5155)\
**Post date:** [April 11, 2022, 10:19pm UTC](https://community.shopify.com/t/topic/113213/2 "2022-04-11T22:19:34Z")

</div>

ご使用のテーマにもよりますが、考えられる要因としては、novalidate: ‘novalidate’ というコードがフォームタグに含まれていないでしょうか？

以下はDebutのコードをベースにですが、同様の事例に回答をさせて頂いておりますのでご参考になりましたら幸いです。

[https://community.shopify.com/post/1510661](https://community.shopify.com/post/1510661)

---

<div class="post-metadata">

**Author:** ![datadesign](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@datadesign](https://community.shopify.com/u/datadesign)\
**Post date:** [April 13, 2022, 2:05am UTC](https://community.shopify.com/t/topic/113213/3 "2022-04-13T02:05:57Z")

</div>

ご連絡いただき誠にありがとうございます。

ご指示の通り、編集をしたところ必須項目にすることができました。

ただ、電話番号を入力して会員登録したあと、管理画面より顧客の情報を閲覧すると電話番号が登録されていません。こちらは何が原因でしょうか…？

ちなみに、themeはDawnを使用しております。
