feat(onboarding): add max-length validation for household name (100 chars)
Fails fast before the API call with a clear German error message. Tests boundary: 100 chars accepted, 101 rejected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,10 @@ export const actions = {
|
||||
return fail(400, { errors: { name: 'Haushaltsname ist erforderlich' }, name: '' });
|
||||
}
|
||||
|
||||
if (name.length > 100) {
|
||||
return fail(400, { errors: { name: 'Haushaltsname darf maximal 100 Zeichen lang sein' }, name });
|
||||
}
|
||||
|
||||
const api = apiClient(fetch);
|
||||
const { data, error } = await api.POST('/v1/households', {
|
||||
body: { name }
|
||||
|
||||
Reference in New Issue
Block a user