Closed ananthakumaran closed 3 years ago
Great idea. Back when I initially implemented this there was no proper date/time support in Elixir so I went with the Regex approach. Dropping support for 1.3
sounds like a reasonable trade-off at this point.
I also just realized that the Travis build isn't properly integrated with Github so we can't see the build status in the pull request. I will have to look into fixing that.
Ok, so there seems to be a failing test in the official test suite, can you have another look at that? https://travis-ci.com/github/ananthakumaran/ex_json_schema/builds/155739838
Updated the code to handle case sensitivity. I had a different commit of the submodule checked out earlier.
The current regex to validate date-time doesn't capture all the invalid dates. Also the spec mandates proper day validation, that is, february can't have 29 on non leap year etc which can't be validated via regex.
This commit uses the DateTime module from standard library to do the validation. Given that the function is available since 1.4, support for 1.3 is dropped.