GithubHelp home page GithubHelp logo

ajv-error-messages's Introduction

ajv-error-messages's People

Contributors

dependabot[bot] avatar divinegod avatar mull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mull studylink-fr

ajv-error-messages's Issues

Use latest version of AJV to fix uri-js version 4.2.1 instead of 4.2.2

A bug with uri-js package has been fixed in ajv, but this lib doesn't use the latest ajv version and isn't using the latest version, and is therefore failing during compiling when using create-react-app.

ajv-validator/ajv#833

Publishing a new version of jv-error-messages based on the lastest 6.x ajv version should fix this.

Or maybe my understanding is just wrong and it's because ajv-error-messages doesn't provide a build at all.

Failed to minify the code from this file:

    ./node_modules/ajv-error-messages/index.js:10:12 

required error field

const RULES = {
    type: 'object',
    additionalProperties: false,
    properties: {
        'valueA': { type: 'string' },
        'valueB': { type: 'integer' }
    },
    required: [ 'valueA', 'valueB' ]
};

results

[ { keyword: 'required',
    dataPath: '',
    schemaPath: '#/required',
    params: { missingProperty: 'valueA' },
    message: "should have required property 'valueA'" },
  { keyword: 'type',
    dataPath: '.valueB',
    schemaPath: '#/properties/valueB/type',
    params: { type: 'integer' },
    message: 'should be integer' } ]

result use ajv-errros-messages

"fields": {
            "": [
                "Should have required property 'valueA'"
            ],
            "valueB": [
                "Should be integer"
            ]
        }

Validating Invalid Schema

{
  error:{
    obj:"Hey"
  }
}

upto best of my knowledge i guess it should thorw an error as Json should be like

{
  "error":{
    "obj":"Hey"
  }
}

will be waiting for your reply.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.