feat(contact): full validation, CMS-translated strings, smaller UI
- contact-form-validation.ts: shared client+server validator returning
{key, params} so messages can be translated via the CMS bundle.
- ContactFormComponent: 3 honeypots, subject field, GDPR consent
checkbox, character counter, inline per-field errors after submit,
uses useTranslate() everywhere.
- /api/contact: origin allowlist, multiple honeypot check, client-age
gate, server-side re-validation, forwards X-Forwarded-For + UA to
CMS forms plugin with consent timestamp in payload.
- TextInput/Textarea: new size="sm" variant (rounded-sm, shadow-sm,
h-10, smaller padding/text). Default "md" unchanged.
- translations.ts: 37 new contact_* keys.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -428,7 +428,6 @@ export type InternalComponentId = "form-contact";
|
||||
export interface InternalComponentBlockData {
|
||||
_type?: "internal_component";
|
||||
_slug?: string;
|
||||
id?: string;
|
||||
component?: InternalComponentId;
|
||||
layout?: BlockLayout;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user