Skip to content

[showError] input does not apply error styling (e.g., red borders) as expected #132

@farshidtorkaman

Description

@farshidtorkaman

When using the component and setting [showError]="true", the expected visual error indication—such as red borders around the input fields—is not displayed. This makes it unclear to users that the entered OTP is invalid or that there's an error.

Steps to reproduce:

  1. Add <ng-otp-input [showError]="true"> to a component.
  2. Trigger a state where showError should reflect an invalid input.
  3. Observe that no visual error styling (e.g., red border) is applied to the OTP inputs.

Expected behavior:
When [showError] is true, the component should display a visual error state (e.g., red borders) around each input field, consistent with typical form validation feedback.

Environment:

  • ng-otp-input version: 2.0.7
  • Angular version: 19.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions