Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Yup test exact string length

node v8.17.0
version: master
endpointsharetweet
const yup = require('yup') const schema = yup.string() .test('len', 'Must be exactly 5 characters', val => val.length === 5) schema.validateSync('12345')
Loading…

no comments

    sign in to comment