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

Dynamically added inputs are still being validated after removal #66

Closed
LiteracyFanatic opened this issue Aug 11, 2023 · 0 comments
Closed

Comments

@LiteracyFanatic
Copy link
Contributor

I have a multi-step form using Alpine.js where inputs can be added and removed in response to user actions. Using watch mode, the new inputs get picked up when added, but the library doesn't seem to properly clear them when they are removed. More specifically I am checking the form for validation errors using isValid before allowing the user to move to the next step, but isValid always returns false if any inputs have been removed from the form. I believe the issue is that the inputs still have entries in summary when isValid gets called. The issue also affects isFieldValid.

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

No branches or pull requests

1 participant