The Wayback Machine - https://web.archive.org/web/20201021214219/https://github.com/topics/validate
Skip to content
#

validate

Here are 352 public repositories matching this topic...

❄️ A React-Native Android iOS Starter App/ BoilerPlate / Example with Redux, RN Router, & Jest with the Snowflake Hapi Server running locally or on RedHat OpenShift for the backend, or a Parse Server running locally or remotely on Heroku
  • Updated Mar 7, 2019
  • JavaScript
ycheapopo
ycheapopo commented Jun 24, 2020
  • [ Y] Are you running the latest version?
  • [ Y] Have you included sample input, output, error, and expected output?
  • [ Y] Have you checked if you are using correct configuration?
  • [ N] Did you try online tool?

Description

When a json includes a number, and running the code example appearing in fast-xml-parser site, causes

uinz
uinz commented Jul 5, 2020

default

const V = require('fastest-validator');

const v = new V();

const schema = {
  tuple: {
    type: 'tuple',
    empty: false,
    items: [{ type: 'string', default: '1' }],
  },
};

const data = { tuple: [] };
console.log(v.validate(data, schema));
console.log(data);
[
  {
    type: 'tupleEmpty',
    message: "The 'tuple' field must not be an empty

Improve this page

Add a description, image, and links to the validate topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the validate topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.