Checks if value matches regex pattern.

const digits = regex(/[0-9]/);

email("hello"); // Error: regex
email("123"); // passes