Skip to content

match

match(dataValue, validatorConfigValue) ⇒ boolean

Check if value match regular expression

Kind: global function

ParamTypeDescription
dataValuestringinput value
validatorConfigValueRegExpinput value, regular expresssion

Example

js
import match from '@hiperf/validate/match';

match('cat', /🐈/); // false
match('Hello 🐈', /🐈/); // true