I want to make all fields on the customer register page mandatory. How can I do it?

Hello everyone

I’ve tried following several examples, but it doesn’t seem to work. Because I only fill in email and password and I can sign up.

and here is the my code in customers/register.liquid.

{{ 'customer.register.title' | t }}

Or Continue with

{%- assign formId = ‘RegisterForm’ -%}
{% form ‘create_customer’, id: formId, novalidate: ‘novalidate’ %}
{% include ‘form-status’, form: form, form_id: formId %}

{{ ‘customer.register.first_name’ | t }}
<input type=“text” name=“customer[first_name]” id=“{{ formId }}-FirstName” {% if form.first_name %}value=“{{ form.first_name }}”{% endif %} aria-required=“true” autocomplete=“given-name” required >

{{ ‘customer.register.last_name’ | t }}
<input type=“text” name=“customer[last_name]” id=“{{ formId }}-LastName” {% if form.last_name %}value=“{{ form.last_name }}”{% endif %} aria-required=“true” autocomplete=“family-name” required>

{{ ‘customer.register.email’ | t }}
<input
type=“email”
name=“customer[email]”
id=“{{ formId }}-email”
class=“{% if form.errors contains ‘email’ %} input–error{% endif %}”
{% if form.email %} value=“{{ form.email }}”{% endif %}
autocorrect=“off”
autocapitalize=“off”
autocomplete=“email”
aria-required=“true”
{%- if form.errors contains ‘email’ -%}
class=“input–error”
aria-invalid=“true”
aria-describedby=“{{ formId }}-email-error”
{%- endif -%}

{%- if form.errors contains ‘email’ -%}

{{ ‘general.accessibility.error’ | t }}
{% include ‘icon-error’ %}
{{ form.errors.translated_fields[‘email’] | capitalize }} {{ form.errors.messages[‘email’] }}.

{%- endif -%}

{{ ‘customer.register.password’ | t }}
<input
type=“password”
name=“customer[password]”
id=“{{ formId }}-password”
class=“{% if form.errors contains ‘password’ %} input–error{% endif %}”
aria-required=“true”
{%- if form.errors contains ‘password’ -%}
class=“input–error”
aria-invalid=“true”
aria-describedby=“{{ formId }}-password-error”
{%- endif -%}

Phone Number

{%- if form.errors contains ‘password’ -%}

{% include ‘icon-error’ %}
{{ form.errors.translated_fields[‘password’] | capitalize }} {{ form.errors.messages[‘password’] }}.

{%- endif -%}

{% endform %}

Hope to get help from you guys.
thank you