validity-text-length

1.0.1 • Public • Published

Text length validator

Validity style validator to ensure visible length of strings. Supports emojis and other graphemes through grapheme splitter

Installation

npm install validity-text-length --save

yarn add validity-text-length

Usage

Below is example usage of the text length validator:

const textLength = require('validity-text-length),
schemata = require('schemata)
 
var schema = schemata (
  {
    firstName:
    {
      type: String
      , validators: { [ textLength(1, 10) ] }
    }
  }
)

/validity-text-length/

    Package Sidebar

    Install

    npm i validity-text-length

    Weekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    8.69 kB

    Total Files

    6

    Last publish

    Collaborators

    • ndumato