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

Add support for the "date-time" type #169

Closed
n1k0 opened this issue Apr 4, 2016 · 1 comment
Closed

Add support for the "date-time" type #169

n1k0 opened this issue Apr 4, 2016 · 1 comment

Comments

@n1k0
Copy link

n1k0 commented Apr 4, 2016

JSONSchema defines a date-time type which doesn't seem to be supported atm by the library (while date oddly does):

> require("jsonschema").validate("aaa", {type: "date-time"})
ValidatorResult {
  instance: 'aaa',
  schema: { type: 'date-time' },
  propertyPath: 'instance',
  errors: [],
  throwError: undefined,
  disableFormat: false }

I'm using jsonschema v1.0.2.

Also it appears that unknown types from the lib will always pass validation, which sounds a little dangerous if you ask me -- though that's probably another issue.

Could we consider bringing support for date-time validation?

@n1k0
Copy link
Author

n1k0 commented Apr 4, 2016

Oh my bad, I've misread the spec, and date-time is a format and not a type! Closing, sorry for the noise.

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

1 participant