Skip to content

Replace ErrorText with StatusText for form validation states #244

Open

Description

@KaiUweCZE

Problem

FormInput has validateStatus with 4 states but only ErrorText component:

type ValidateStatus = "default" | "error" | "success" | "warning"

// Current implementation (line 69-76):
validateStatus === "error" ? (
  <ErrorText showIcon>{helpText}</ErrorText>
) : (
  <ExtraText>{helpText}</ExtraText>  // Used for success, warning, default
)

Issues:

  • Success/warning messages use ExtraText (no icon, wrong styling)
  • ErrorText name doesn't fit success/warning semantics
  • Inconsistent UX across validation states

Proposal: StatusText

  <StatusText
    status={validateStatus}  // error | success | warning | default
    showIcon={validateStatus !== "default"}
  >
    {helpText}
  </StatusText>

Benefits:

  • Icons for all validation states (✓ success, ⚠ warning, ✗ error)
  • Proper colors per status
  • Single component for all form validation
  • Consistent with validateStatus naming

@BleedingDev Should we implement this?

---Files: libs/ui/src/molecules/form-input.tsx (line 69-76)

Activity

  1. coderabbitai commented on Dec 23, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  2. BleedingDev commented on Dec 25, 2025

    @BleedingDev
    Collaborator

    I like it, let's do it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions