You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: smart form validation with field types and HTML5 attrs (#255)
* feat: add smart form validation with field types, HTML5 attrs, and password confirmation
Add specialized field types (email, url, phone/tel, password) that generate
appropriate Go validation tags and HTML5 input attributes. Replace template-level
GoType branching with metadata-driven ValidateTag, eliminating duplicated logic
across 5 handler templates. Add password confirmation with eqfield cross-validation.
Enhance ValidationToMultiError in the livetemplate framework with formatFieldName
for human-readable error messages and toSnakeCase for correct multi-word form field
name matching.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address bot review comments
- Remove unused goType param from GetFieldMetadata (Claude)
- Add required validate tag for reference field IDs (Copilot)
- Add password confirmation to embedded template edit forms (Claude)
- Add maxlength to embedded template password edit inputs (consistency)
- Derive supported-types list via supportedTypes() helper (Copilot)
- Add unknown_type fallback test case for GetFieldMetadata (Claude)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: populate field metadata in parseFieldsWithInference
The CLI's parseFieldsWithInference constructed parser.Field without
Metadata, causing generated handlers to omit validation tags entirely.
This broke E2E validation tests since server-side validation was
no longer enforced.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments