How to make custom fields in register form required

Topic summary

A user is attempting to add required custom fields (Business Name and EIN Number) to a Shopify customer registration form but encountering validation issues.

Current Problem:

  • Custom fields were successfully added to the register form using customer metafields (customer[note][Field Name] format)
  • The required attribute has been added to the input fields
  • However, the form can still be submitted without filling in these custom fields

Technical Details:

  • Fields are being added to main-register.liquid theme file
  • Implementation follows a YouTube tutorial for adding custom registration fields
  • Both required and aria-required="true" attributes are present in the code

Status: The issue remains unresolved. The user has shared their development store link and code snippets, seeking help to properly enforce validation on these custom metafield inputs before form submission.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Hi guys.

I’m searching for a solution. I added custom fields to register form https://capture.dropbox.com/E3t1pgDDJ4AScsVT. And I’m trying to make it required, but it doesn’t work. Can you help me with it please?

<div class="field">
<input
required
type="text"
name="customer[note][Business Name]"
id="RegisterForm-businessName"
{% if form.custom.business_name %}
value="{{ form.custom.business_name }}"
{% endif %}
autocomplete="off"
placeholder="Business Name"
aria-required="true"
>
<label for="RegisterForm-businessName">
Business Name
<span aria-hidden="true">*</span>
</label>
</div>
<div class="field">
<input
required
type="text"
name="customer[note][EIN Number]"
id="RegisterForm-einNumber"
{% if form.custom.ein_number %}
value="{{ form.custom.ein_number }}"
{% endif %}
autocomplete="off"
placeholder="EIN Number"
aria-required="true"
>
<label for="RegisterForm-einNumber">
EIN Number
<span aria-hidden="true">*</span>
</label>
</div>

thank you for reply. this is link to register form https://9a4714-41.myshopify.com/account/register. it has 2 custom fields as Business Name and EIN Number. I used this tutorial to add it https://www.youtube.com/watch?v=3J6nHN6DkGo. so I added the code I attached to main-register.liquid and seems to be added required attributes. but form is still can be filled without these custom fields.