Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-invalid remains when validation rules are removed from the input #1384

Closed
justin-schroeder opened this issue May 28, 2024 · 3 comments
Closed
Labels
🐛 bug Verified bug by team

Comments

@justin-schroeder
Copy link
Member

Reproduction

https://formkit.link/8078c60918386346316fbc4f74d332a8

Describe the bug

When a validation rule is conditionally removed (reboot validation) the failing state is not reset.

Environment

• OS: macOS
• Browser: Chrome
• Version: 1.6.4

@justin-schroeder
Copy link
Member Author

fixed in 1.6.5

@Nobe-san
Copy link

@justin-schroeder problem is still on textarea, its permanently as data-complete true.

@justin-schroeder
Copy link
Member Author

@Nobe-san I dont think there is a bug here, but feel free to demonstrate with a reproduction and ill take a look. The complete state is described here: https://formkit.com/api-reference/context#state

{
  ...
  /**
   * True when these conditions are met:
   *
   * Either:
   * - The input has validation rules
   * - The validation rules are all passing
   * - There are no errors on the input
   * Or:
   * - The input has no validation rules
   * - The input has no errors
   * - The input is dirty and has a value
   *
   * This is not intended to be used on forms/groups/lists, but instead on
   * individual inputs. Imagine placing a green checkbox next to each input
   * when the user filled it out correctly — that's what these are for.
   */
  complete: boolean,
  ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Verified bug by team
Projects
None yet
Development

No branches or pull requests

2 participants