Match validators should raise Invalid when given a non-string.

Includes a doctest and implementation.