Feat: Implement fine grained teamer profile data validation

This commit is contained in:
Björn Fromme
2023-09-19 18:42:01 +02:00
parent 9a95daa3db
commit 7f7a35e7a2
13 changed files with 156 additions and 20 deletions
+10 -1
View File
@@ -7,12 +7,21 @@
{%- endif -%}
<div{% with {attr: row_attr} %}{{ block('attributes') }}{% endwith %}>
{{- form_label(form) -}}
{{- form_errors(form) -}}
{{- form_widget(form, widget_attr) -}}
{{- form_errors(form) -}}
{{- form_help(form) -}}
</div>
{%- endblock form_row -%}
{%- block form_label -%}
{% set class = ' font-bold' %}
{% if errors|length %}
{% set class = class ~ ' text-red-500' %}
{% endif %}
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ class)|trim}) %}
{{ parent() }}
{%- endblock form_label -%}
{%- block form_errors -%}
{%- if errors|length > 0 -%}
<ul>
+3
View File
@@ -73,6 +73,7 @@
Anschrift
</h3>
<div class="flex flex-col space-y-4 pb-8">
{{ form_errors(form.address) }}
{{ form_row(form.address.street) }}
{{ form_row(form.address.postCode) }}
{{ form_row(form.address.city) }}
@@ -82,6 +83,7 @@
Kontakt
</h3>
<div class="flex flex-col space-y-4">
{{ form_errors(form.communication) }}
{{ form_row(form.communication.email) }}
{{ form_row(form.communication.phone) }}
{{ form_row(form.communication.mobile) }}
@@ -93,6 +95,7 @@
Bankverbindung
</h3>
<div class="flex flex-col space-y-4">
{{ form_errors(form.bankAccount) }}
{{ form_row(form.bankAccount.iban) }}
{{ form_row(form.bankAccount.bic) }}
{{ form_row(form.bankAccount.bank) }}