Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Card Disable() / Enable() update #60

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

vivianspencer
Copy link

Applied fixes from #38

Fixed an issue where disabled cards were being passed through validation

vivianspencer and others added 2 commits January 7, 2014 05:23
Applied fixes from amoffat#38

Fixed an issue where disabled cards were being passed through validation
@MaarekElets
Copy link

I'm going to be using this Fork until it hits the main branch. I prefer your way of fixing the validation issue to the hack I applied in my personal code. Thanks!

Changed back button class on first index to .hidden rather than .disabled
Fixed behavior of validation behavior when skipping a disabled tab.
Minified updated code js
@MaarekElets
Copy link

Upon testing and further review of the code, I don't believe it operates correctly or at least it doesn't for what I am doing. Using the existing code, when I click next and a disabled tab is the next tab then it appears that the ending index is increased by 1 as well as the current index, which means that the landing tab is run through the validation (and fails obviously if it has any validation on it). Also it appears that the initial card is not hidden as both the card I left and the target card displayed. I'm putting in a pull request from a fork I made of this repo that does a disabled check on just the point where validation is run (and returns ok if it is disabled) which when I test functions as desired.

Bug in Disabled Validation behavior
If an element contains validation the message for the first error is always displayed, any subsequent error messages aren't displayed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants