stephenh/tessell — pull request #16 by patgannon (2014-12-24 23:41:54+00:00)
Title: Implemented pending validation support

These are the changes we had talked about using for validating that we have access to a company page on the server side (although we may not wind up doing that).

Adding the "ExternalRule" class is a little bit of a hack. I realized late that (without it) a rule that went from Valid.PENDING to Valid.FALSE would not re-trigger the event (because it was already flagged as triggered), so the validation message would not be shown. (The way my initial test was structured hid this bug.) As a result, pending validation won't work for any of the other concrete rule types. A better approach might be for AbstractRule to know about the previous validation result (so it can untrigger before re-triggering if the validation result changed), although I'm not sure if that's fool-proof. In any case, I'd like to at least get some feedback and not let these changes linger in purgatory on my machine.