Skip to content

bug: input-primary overrides validator states (never shows error or success colors) #4766

Closed

Description

@MGhafouriV

Reproduction URL (Required)

https://play.tailwindcss.com/6BtUSmzhub

What version of daisyUI are you using?

5.7.40

Which browsers are you seeing the problem on?

No response

Describe your issue

When using validator on an input with validation rules (such as minlength="5"):

  • When invalid (less than 5 characters), it should show the error state (red).
  • When valid (5 or more characters), it should show the success state (green).

This works as expected with a standard input:

<input type="text" class="input validator" minlength="5" />

However, when adding a color modifier like input-primary, both the error and success states are ignored. The input is always stuck on the primary color:

<input type="text" class="input input-primary validator" minlength="5" />

Activity

  1. github-actions commented on Sep 17, 2026

    @github-actions

    Thank you @MGhafouriV for reporting issues. It helps daisyUI a lot 💚
    I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
    In the meantime providing more details and reproduction links would be helpful.

  2. added a commit that references this issue on Sep 18, 2026
    6fcaa55
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