enthought/enaml — pull request #176 by corranwebster (2012-07-30 21:57:43+00:00)
Title: Aysnc Validators

This is a refactor of the validator ideas to separate out the validation logic from triggering and styling.

A validator now consists of a type, a message and a collection of arguments. A Field widget then gets an attribute with a list of validators and another with a list of triggers which determine when all validators get run (and in the future stylesheets will have a hook to specify styles when the widget is in an invalid state). On the toolkit side these specifications are turned into appropriate code that binds to the trigger events and runs toolkit validators. On failure, a message is displayed, and styling changed.

This PR has the appropriate changes to the specifications and Field widget, along with an untested attempt at implementation for the Qt toolkit.