Validate match

Closes DoSomething/dosomething#831. Adds "match" validator, refactors validation code a bit to keep it DRY.