Closed tit closed 7 years ago
If you carefully read the README, you could have found out that this does not work because it is not supported. The fromat keyword is not mandatory in the JSON schema spec and it is ridiculously complicated to verify an email's syntactical conformance to the RFC - it is not only about having exactly one @ (actually, there may be more), some local name and some domain.
We decided that everything apart from a standard compliant check (which is not worth it to us - maybe someone will change our minds) would restrict the check in an unacceptable way.
But, also described in the README (surprise!) is how to add and use custom format validators with json-schema with which you could add a validation to check for compliance with your particular view of what a correct email is. "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
is a valid email which you probably nevertheless would not like to validate, maybe or maybe you want to exclude display names as in Foo <bar@example.com>
...
I have some JSON, ex:
I want create JSON schema for this JSON.
Is this acceptable? But it don't work. :(