ARRAY

Verifies if the input data is an array. Default delimiter for string checking: ,

Options
  • parseboolean, false should we JSON.parse() the items of the array. Items that cannot be parsed will be ignored.
  • delimiterstring, comma the delimiter to use when splitting the string
  • minnumberif specified, the minimum length of the array
  • maxnumberif specified, the maximum number of items.
  • typestringif specified, the typeof value of the inner array items. If at least one fails the check, the validation fails.
'use strict';
thorin.validate('ARRAY', 'inputString', {
   parse: false,
   delimited: ',',
   min: 10,
   max: 100,
   type: "string"
});
Do you have a question or is something missing?

You can always create a new issue on GitHub or contact one of the core founders by chat.