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

date-time validation #22

Closed
ubmarco opened this issue Jul 22, 2020 · 4 comments
Closed

date-time validation #22

ubmarco opened this issue Jul 22, 2020 · 4 comments

Comments

@ubmarco
Copy link

ubmarco commented Jul 22, 2020

Hi,
thanks for this awesome coc extension, I use it often. I stumbled upon a problem with date-time validation.
This is my schema:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date-time"
    }
  }
}

This is my JSON:

{
  "date": "020-12-23T18:25:43.511Z"
}

The year is missing the first digit and coc-json does not report any errors. Actually no errors are detected, it seems like it ignores the validation. When I set the format to email, all erroneous mail addresses are reported, so the format validation is working.
Here is how it should behave: https://www.jsonschemavalidator.net/s/AjNuDoH9

Is that a known issue?

@chemzqm
Copy link
Member

chemzqm commented Jul 23, 2020

@ubmarco
Copy link
Author

ubmarco commented Jul 24, 2020

I opened this ticket for vscode-json-languageservice and they say date-time validation was added in version 3.3.1 while coc-json uses 3.3.0.
Can we update to 3.3.1?

@chemzqm
Copy link
Member

chemzqm commented Jul 24, 2020

Sure, but it's not easy for coc-json

@ubmarco
Copy link
Author

ubmarco commented Jul 24, 2020

Thanks for the feedback. May I ask what obstacles you see?
When I look ad the diff between 3.3.0 and 3.3.1 it seems no big structural changes were done in the LS. I can help if you guide me just a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants