Allow regular expressions to be used as the validate type.