tlivings / enjoi

Converts a JSON schema to a Joi schema.
Apache License 2.0
282 stars 57 forks source link

Fix time-secfrac part of time regex #69

Closed maldimirov closed 5 years ago

maldimirov commented 5 years ago

The time-secfrac part of the time validation regex was added with https://github.com/tlivings/enjoi/pull/66. Currently it is a 3 digit fraction. But as stated in https://github.com/java-json-tools/json-schema-validator/issues/143 it actually needs to be a one or more number of digits. I couldn't find an exact explanation for the 1*DIGIT format stated in RFC3339, but it seems that's the case. It would be great to hear what @nevezide thinks about this.

nevezide commented 5 years ago

Hi @maldimirov, thanks for asking :)

I don't see any issues to support illimited digits.