* Added boolean value to onChange event handler to indicate whether the requirements have been met or not.
* Some code cleanup.
* Updated demo.