Add email validation to tenant email field
Added conditional required validation and format validation for tenant email. Changes: - Tenant email is now required when autoTenantNotification is enabled - Added email format validation using Zod's built-in email validator - Email field validates format even when autoTenantNotification is off (if not empty) - Added localization strings for validation errors (Croatian/English) Validation logic: - Format validation: Always checks if email is valid format (when not empty) - Required validation: Email required when autoTenantNotification is true - Error messages: "email address is invalid" for format, "tenant email is missing" for required 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -145,6 +145,8 @@
|
||||
"location-name-required": "Relaestate name is required",
|
||||
"tenant-first-name-required": "tenant first name is missing",
|
||||
"tenant-last-name-required": "tenant last name is missing",
|
||||
"tenant-email-required": "tenant email is missing",
|
||||
"tenant-email-invalid": "email address is invalid",
|
||||
"validation-failed": "Validation failed. Please check the form and try again."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
"location-name-required": "Ime nekretnine je obavezno",
|
||||
"tenant-first-name-required": "nedostaje ime podstanara",
|
||||
"tenant-last-name-required": "nedostaje prezime podstanara",
|
||||
"tenant-email-required": "nedostaje email podstanara",
|
||||
"tenant-email-invalid": "email adresa nije ispravna",
|
||||
"validation-failed": "Validacija nije uspjela. Molimo provjerite formu i pokušajte ponovno."
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user