fix: Require full name (first + last) during registration
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Users could register with just a first name, causing incomplete data in participant lists. Added backend validation (min 2 words) and HTML pattern attribute. Also fixed Polish characters in flash message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4a033f0d81
commit
fbbbf6803c
@ -111,7 +111,12 @@ def register():
|
||||
|
||||
# Validate required fields
|
||||
if not name or not email or not company_nip:
|
||||
flash('Imie, email i NIP firmy sa wymagane.', 'error')
|
||||
flash('Imię, email i NIP firmy są wymagane.', 'error')
|
||||
return render_template('auth/register.html')
|
||||
|
||||
# Validate full name (first + last name)
|
||||
if len(name.split()) < 2:
|
||||
flash('Podaj imię i nazwisko (np. Jan Kowalski).', 'error')
|
||||
return render_template('auth/register.html')
|
||||
|
||||
# Validate NIP format and checksum
|
||||
|
||||
@ -319,6 +319,8 @@
|
||||
required
|
||||
autocomplete="name"
|
||||
autofocus
|
||||
pattern=".*\s+.*"
|
||||
title="Podaj imię i nazwisko (np. Jan Kowalski)"
|
||||
>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user