Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling Schema when validations are run #2895

Closed
3 of 4 tasks
gaganmeet opened this issue Jun 25, 2022 · 9 comments
Closed
3 of 4 tasks

Error compiling Schema when validations are run #2895

gaganmeet opened this issue Jun 25, 2022 · 9 comments
Assignees
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned

Comments

@gaganmeet
Copy link

Prerequisites

What theme are you using?

chakra-ui

Version

4.2.0

Current Behavior

I have added a form on my react app which has rather simple schema for testing and it's throwing an error mentioned on submitting. After it submit functions runs without checking for validations.
rjfserror

Expected Behavior

Add a form with simple schema:

{
  "title": "A registration form",
  "description": "A simple form example.",
  "type": "object",
  "required": [
    "firstName",
    "lastName"
  ],
  "properties": {
    "firstName": {
      "type": "string",
      "title": "First name",
      "default": "Chuck",
      "minLength": 3
    }
  }
}

Steps To Reproduce

No response

Environment

- OS: Windows 11
- Node: 16.14.2
- npm: 8.5.0

Anything else?

No response

@gaganmeet gaganmeet added bug needs triage Initial label given, to be assigned correct labels and assigned labels Jun 25, 2022
@epicfaace
Copy link
Member

Please provide a playground link.

@JohnRosner
Copy link

The error message here is the same as the one here: #2020

I've also run into this error message but only on a production build. When I get the error, and copy the schema I'm using to the playground, the error does not appear and therefore I'm unable to reproduce the error in the playground making it difficult to track down this bug.

@gaganmeet
Copy link
Author

I am not able to reproduce same error on playground as I am using it to build a chrome extension. I tried using ajv explicitly to check for errors and got same error.

@JohnRosner
Copy link

Is the error your getting from AJV reasonable or do you think this could be a bug in AJV?

As for my case, I set noValidate to true to disable validation yet this error still occurs for me.

@heath-freenome
Copy link
Member

It maybe a symptom of this issue in AJV6... we are actively working on a v5 version (with breaking changes) that will support using AJV8 where that issue is fixed

@JohnRosner
Copy link

Out of curiosity, what is the estimate on when v5 will be released?

@heath-freenome
Copy link
Member

we are shooting for an alpha by august... beta by september, release before october... That's the best guess right now

@skysantoroa
Copy link

skysantoroa commented Sep 5, 2022

Any previous version not affected by this?

@heath-freenome
Copy link
Member

Duplicate of #2020

@heath-freenome heath-freenome marked this as a duplicate of #2020 Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Initial label given, to be assigned correct labels and assigned
Projects
None yet
Development

No branches or pull requests

6 participants