maxLength
maxLength(dataValue, validatorConfigValue) ⇒ boolean
Check for max string length
Kind: global function
| Param | Type | Description |
|---|---|---|
| dataValue | string | input string |
| validatorConfigValue | number | max expected value |
Example
js
import maxLength from '@hiperf/validate/maxLength';
maxLength('John', 5); // false
maxLength('John', 2); // true