jpillora / jquery.async.validator

A jQuery plugin for fully customisable asynchronous client-side validations.
http://jpillora.github.com/jquery.async.validator/
1 stars 0 forks source link

else case missing for prevalidate #6

Closed matthewtuck closed 11 years ago

matthewtuck commented 11 years ago
+      if(opts.prevalidate) {
+        opts.showPrompt = false;
+        this.validate(function() {
+          opts.showPrompt = true;
+        });
+      } 

This looks like it should have an else case that sets opts.showPrompt to true, otherwise prompts will never appear when prevalidate is off, due to it starting as null.

Not sure why the tests didn't catch this.

jpillora commented 11 years ago

as the prompt library has been split out from this one, the tests are only testing validation results, though i could write a test that spies on the prompt fn

matthewtuck commented 11 years ago

Sure, a spy sounds quite important here.