UNPKG

@codeparticle/formal

Version:

A <2kb library for validating data of any kind

15 lines (12 loc) 379 B
import { ValidationRule } from '../types/index.js'; /** * @file rule to verify that a given string matches a certain regex * @author Nick Krause */ /** * Check to see that a value matches a given regex. * Will fail for non-string values. * @param regex {RegExp} validation regex */ declare const matchesRegex: (regex: RegExp) => ValidationRule; export { matchesRegex };