match
match(dataValue, validatorConfigValue) ⇒ boolean
Check if value match regular expression
Kind: global function
Param | Type | Description |
---|---|---|
dataValue | string | input value |
validatorConfigValue | RegExp | input value, regular expresssion |
Example
js
import match from '@hiperf/validate/match';
match('cat', /🐈/); // false
match('Hello 🐈', /🐈/); // true