Finish implementing %validator.

Fixes #3634