Tools, FAQ, Tutorials:
Multiple JSON Schema Validation Keywords
How multiple Validation Keywords work in JSON Schema?
✍: FYIcenter.com
Multiple Validation Keywords work in JSON Schema with the "AND" logic.
The order of validation keywords is not important.
In other words, all of them are applied individually to the JSON instance based their specified conditions.
For example, the following schema requires the JSON instance must a JSON String AND match the given regular expression pattern:
JSON Schema: { "pattern": ".*@.*", "type": "string", "minLength": 15 } {"enum": ["YES", "NO"]} Valid JSON instance: help@fyicenter.com Invalid JSON instance: "to@bbc.com" Invalid JSON instance: 3.1415926535897932384626433
⇒ JSON Type Definitions and References
2017-08-25, 1626🔥, 0💬
Popular Posts:
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
Where to get a JSON.stringify() Example Code in JavaScript? Here is a good JSON.stringify() example ...
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...