Checks if value matches regex pattern.
const digits = regex(/[0-9]/);email("hello"); // Error: regexemail("123"); // passes Copy
const digits = regex(/[0-9]/);email("hello"); // Error: regexemail("123"); // passes
Pattern used for matching.
Checks if value matches regex pattern.
Example