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

Unhappy method not firing on "when" #49

Open
davedawson opened this issue Aug 29, 2014 · 4 comments
Open

Unhappy method not firing on "when" #49

davedawson opened this issue Aug 29, 2014 · 4 comments

Comments

@davedawson
Copy link

I'm attempting to use the unhappy method to call a custom function when the field requirements aren't met. I'm using the "when" method to check the fields on "blur." The unhappy method works great when I submit the form, but not on blur.

@ryanweber88
Copy link

Same issue here, validation on submit, but no feedback to the user on blur. I put some debug in the library to check if the blur events are firing and they are, there is just no message appended to the markup.

@HenrikJoreteg
Copy link
Owner

Hi @ryanweber88, just a heads up as per: #72 i'm not actively maintaining this and looking for help. Because obviously other people are :)

@amcereijo
Copy link

Solutions seems to be change
field.testValid();

in line 58 , for

field.testValid(true);

@btpoe
Copy link
Collaborator

btpoe commented Feb 6, 2016

The problem is that some users are counting on this test not firing on the when event. To change the behavior would cause unexpected results for those users should they update.

An example where this could cause trouble is if a user has an ajax request in their validity test and the when event set to keyup. Those server requests would get out of hand.

Even without an ajax request, if the when event is set to keyup, I find it annoying when I start typing my email address and 2 characters in, I'm informed this is not a valid email address.

I'm open to creating a new option: validateWhen that would behave the same as when with the exception that it would test validation.

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

5 participants