I've built a front end user registration form and everything is working well with it except that it's not showing errors for my custom fields. They're set as required in the CP, but the form submits even if they aren't filled in. When the standard required fields aren't filled in the for returns an error but none for the custom fields.
I understand first and last name can't be required. In the example below my custom required fields are participantPhone and participantCity.
<form method="post" accept-charset="UTF-8">
<div class="form-group signup-form">
{{ csrfInput() }}
<input type="hidden" name="action" value="users/save-user">
{{ redirectInput('sign-up-ty') }}
{% macro errorList(errors) %}
{% if errors %}
<ul class="errors">
{% for error in errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{% from _self import errorList %}
<input id="username" class="form-control" type="text" name="username" {%- if user is defined %} value="{{ user.username }}"{% endif -%} placeholder="username">
{% if user is defined %}
{{ errorList(user.getErrors('username')) }}
{% endif %}
<input id="firstName" class="form-control" type="text" name="firstName" {%- if user is defined %} value="{{ user.firstName }}"{% endif -%} placeholder="first name">
<input id="lastName" class="form-control" type="text" name="lastName" {%- if user is defined %} value="{{ user.lastName }}"{% endif -%} placeholder="last name">
<input id="email" class="form-control" type="text" name="email"{%- if user is defined %} value="{{ user.email }}"{% endif %} placeholder="email">
{% if user is defined %}
{{ errorList(user.getErrors('email')) }}
{% endif %}
<input id="password" class="form-control" type="password" name="password" placeholder="password">
{% if user is defined %}
{{ errorList(user.getErrors('password')) }}
{% endif %}
<input id="participantPhone" class="form-control" type="text" name="fields[participantPhone]" {%- if user is defined %} value="{{ user.participantPhone }}"{% endif -%} placeholder="phone">
{% if user is defined %}
{{ errorList(user.getErrors('participantPhone')) }}
{% endif %}
<input id="participantCity" class="form-control" type="text" name="fields[participantCity]" {%- if user is defined %} value="{{ user.participantCity }}"{% endif -%} placeholder="city">
{% if user is defined %}
{{ errorList(user.getErrors('participantCity')) }}
{% endif %}
<input id="register-button" class="btn btn-outline-primary" type="submit" value="Register">
</div>
</form>