Skip to content

feat(admin): surface schema parse errors inline next to the offending field in FormBuilder #2013

@cdcore09

Description

@cdcore09

Summary

When the user saves a schema that the server rejects (e.g., a choice field with too many options), parseFormSchema returns { ok: false, message: "f3: too many options (max 30)" }. The FormDetailPage currently shows this in the global `actionError` banner, not inline next to the offending field.

Requirements

  • Parse the error message field-id prefix (e.g., `f3:`) and pass the per-field error down to FormBuilder
  • Highlight the offending field with a red border + inline error message
  • Banner stays for non-field-specific errors

Context

Plan 4 review follow-up. UX polish — current behavior works but is hard to act on for forms with many fields.

Files

  • `apps/admin/src/pages/forms/FormDetailPage.tsx` (Save schema handler)
  • `apps/admin/src/components/FormBuilder.tsx` (accept and render field-specific error prop)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions